Skip to content

Commit

Permalink
Add a tentative WPT for the 'blocking' IDL attribute
Browse files Browse the repository at this point in the history
This patch adds a WPT that verifies the IDL changes in

whatwg/html#7603

Bug: 1271296
Change-Id: Id53f4d744c99602a2305e8af91a56b92f8ef0e03
  • Loading branch information
xiaochengh authored and chromium-wpt-export-bot committed Feb 11, 2022
1 parent 1b77c45 commit 6cbe780
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions html/dom/render-blocking/blocking-idl-attr.tentative.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!DOCTYPE html>
<title>Tests the 'blocking' IDL attribute on link, script and style elements</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
// Tests that the 'blocking' attribute follows the IDL:
// [SameObject, PutForwards=value] readonly attribute DOMTokenList blocking;

test(() => {
const link = document.createElement('link');
link.blocking = 'asdf';
assert_equals(link.blocking.value, 'asdf');
}, "'blocking' IDL attribute of the link element");

test(() => {
const script = document.createElement('script');
script.blocking = 'asdf';
assert_equals(script.blocking.value, 'asdf');
}, "'blocking' IDL attribute of the script element");

test(() => {
const style = document.createElement('style');
style.blocking = 'asdf';
assert_equals(style.blocking.value, 'asdf');
}, "'blocking' IDL attribute of the style element");
</script>

0 comments on commit 6cbe780

Please sign in to comment.