diff --git a/tests/wpt/metadata/MANIFEST.json b/tests/wpt/metadata/MANIFEST.json
index 12e5be2479a..6557de4a971 100644
--- a/tests/wpt/metadata/MANIFEST.json
+++ b/tests/wpt/metadata/MANIFEST.json
@@ -3225,6 +3225,14 @@
"path": "touch-events/single-touch-manual.html",
"url": "/touch-events/single-touch-manual.html"
},
+ {
+ "path": "uievents/order-of-events/mouse-events/click-on-body-manual.html",
+ "url": "/uievents/order-of-events/mouse-events/click-on-body-manual.html"
+ },
+ {
+ "path": "uievents/order-of-events/mouse-events/click-on-html-manual.html",
+ "url": "/uievents/order-of-events/mouse-events/click-on-html-manual.html"
+ },
{
"path": "uievents/order-of-events/mouse-events/mouseevents-mousemove-manual.htm",
"url": "/uievents/order-of-events/mouse-events/mouseevents-mousemove-manual.htm"
@@ -4669,6 +4677,16 @@
],
"url": "/html/rendering/non-replaced-elements/lists/ol-type-unsupported-disc.html"
},
+ {
+ "path": "html/rendering/non-replaced-elements/lists/ol-type-unsupported-invalid.html",
+ "references": [
+ [
+ "/html/rendering/non-replaced-elements/lists/ol-type-unsupported-ref.html",
+ "=="
+ ]
+ ],
+ "url": "/html/rendering/non-replaced-elements/lists/ol-type-unsupported-invalid.html"
+ },
{
"path": "html/rendering/non-replaced-elements/lists/ol-type-unsupported-lower-alpha.html",
"references": [
@@ -4769,6 +4787,16 @@
],
"url": "/html/rendering/non-replaced-elements/lists/ul-type-unsupported-decimal.html"
},
+ {
+ "path": "html/rendering/non-replaced-elements/lists/ul-type-unsupported-invalid.html",
+ "references": [
+ [
+ "/html/rendering/non-replaced-elements/lists/ul-type-unsupported-ref.html",
+ "=="
+ ]
+ ],
+ "url": "/html/rendering/non-replaced-elements/lists/ul-type-unsupported-invalid.html"
+ },
{
"path": "html/rendering/non-replaced-elements/lists/ul-type-unsupported-lower-alpha.html",
"references": [
@@ -19055,6 +19083,10 @@
"path": "html/syntax/serializing-html-fragments/outerHTML.html",
"url": "/html/syntax/serializing-html-fragments/outerHTML.html"
},
+ {
+ "path": "html/syntax/serializing-xml-fragments/outerHTML.html",
+ "url": "/html/syntax/serializing-xml-fragments/outerHTML.html"
+ },
{
"path": "html/webappapis/animation-frames/callback-exception.html",
"url": "/html/webappapis/animation-frames/callback-exception.html"
@@ -21328,12 +21360,20 @@
"url": "/old-tests/submission/Opera/script_scheduling/105.html"
},
{
- "path": "old-tests/submission/Opera/script_scheduling/106.html",
- "url": "/old-tests/submission/Opera/script_scheduling/106.html"
+ "path": "old-tests/submission/Opera/script_scheduling/106-import.html",
+ "url": "/old-tests/submission/Opera/script_scheduling/106-import.html"
},
{
- "path": "old-tests/submission/Opera/script_scheduling/107.html",
- "url": "/old-tests/submission/Opera/script_scheduling/107.html"
+ "path": "old-tests/submission/Opera/script_scheduling/106-noimport.html",
+ "url": "/old-tests/submission/Opera/script_scheduling/106-noimport.html"
+ },
+ {
+ "path": "old-tests/submission/Opera/script_scheduling/107-import.html",
+ "url": "/old-tests/submission/Opera/script_scheduling/107-import.html"
+ },
+ {
+ "path": "old-tests/submission/Opera/script_scheduling/107-noimport.html",
+ "url": "/old-tests/submission/Opera/script_scheduling/107-noimport.html"
},
{
"path": "old-tests/submission/Opera/script_scheduling/108.html",
@@ -26755,6 +26795,58 @@
"path": "shadow-dom/untriaged/user-interaction/ranges-and-selections/test-002.html",
"url": "/shadow-dom/untriaged/user-interaction/ranges-and-selections/test-002.html"
},
+ {
+ "path": "streams/byte-length-queuing-strategy.https.html",
+ "url": "/streams/byte-length-queuing-strategy.https.html"
+ },
+ {
+ "path": "streams/count-queuing-strategy.https.html",
+ "url": "/streams/count-queuing-strategy.https.html"
+ },
+ {
+ "path": "streams/readable-streams/bad-strategies.https.html",
+ "url": "/streams/readable-streams/bad-strategies.https.html"
+ },
+ {
+ "path": "streams/readable-streams/bad-underlying-sources.https.html",
+ "url": "/streams/readable-streams/bad-underlying-sources.https.html"
+ },
+ {
+ "path": "streams/readable-streams/brand-checks.https.html",
+ "url": "/streams/readable-streams/brand-checks.https.html"
+ },
+ {
+ "path": "streams/readable-streams/cancel.https.html",
+ "url": "/streams/readable-streams/cancel.https.html"
+ },
+ {
+ "path": "streams/readable-streams/count-queuing-strategy-integration.https.html",
+ "url": "/streams/readable-streams/count-queuing-strategy-integration.https.html"
+ },
+ {
+ "path": "streams/readable-streams/garbage-collection.https.html",
+ "url": "/streams/readable-streams/garbage-collection.https.html"
+ },
+ {
+ "path": "streams/readable-streams/general.https.html",
+ "url": "/streams/readable-streams/general.https.html"
+ },
+ {
+ "path": "streams/readable-streams/pipe-through.https.html",
+ "url": "/streams/readable-streams/pipe-through.https.html"
+ },
+ {
+ "path": "streams/readable-streams/readable-stream-reader.https.html",
+ "url": "/streams/readable-streams/readable-stream-reader.https.html"
+ },
+ {
+ "path": "streams/readable-streams/tee.https.html",
+ "url": "/streams/readable-streams/tee.https.html"
+ },
+ {
+ "path": "streams/readable-streams/templated.https.html",
+ "url": "/streams/readable-streams/templated.https.html"
+ },
{
"path": "svg/interfaces.html",
"url": "/svg/interfaces.html"
@@ -26951,10 +27043,18 @@
"path": "web-animations/animation-timeline/idlharness.html",
"url": "/web-animations/animation-timeline/idlharness.html"
},
+ {
+ "path": "web-animations/animation/constructor.html",
+ "url": "/web-animations/animation/constructor.html"
+ },
{
"path": "web-animations/keyframe-effect/constructor.html",
"url": "/web-animations/keyframe-effect/constructor.html"
},
+ {
+ "path": "web-animations/keyframe-effect/getComputedTiming.html",
+ "url": "/web-animations/keyframe-effect/getComputedTiming.html"
+ },
{
"path": "webaudio/the-audio-api/the-audiobuffer-interface/idl-test.html",
"url": "/webaudio/the-audio-api/the-audiobuffer-interface/idl-test.html"
@@ -35436,6 +35536,18 @@
"url": "/html/rendering/non-replaced-elements/lists/ol-type-unsupported-disc.html"
}
],
+ "html/rendering/non-replaced-elements/lists/ol-type-unsupported-invalid.html": [
+ {
+ "path": "html/rendering/non-replaced-elements/lists/ol-type-unsupported-invalid.html",
+ "references": [
+ [
+ "/html/rendering/non-replaced-elements/lists/ol-type-unsupported-ref.html",
+ "=="
+ ]
+ ],
+ "url": "/html/rendering/non-replaced-elements/lists/ol-type-unsupported-invalid.html"
+ }
+ ],
"html/rendering/non-replaced-elements/lists/ol-type-unsupported-lower-alpha.html": [
{
"path": "html/rendering/non-replaced-elements/lists/ol-type-unsupported-lower-alpha.html",
@@ -35556,6 +35668,18 @@
"url": "/html/rendering/non-replaced-elements/lists/ul-type-unsupported-decimal.html"
}
],
+ "html/rendering/non-replaced-elements/lists/ul-type-unsupported-invalid.html": [
+ {
+ "path": "html/rendering/non-replaced-elements/lists/ul-type-unsupported-invalid.html",
+ "references": [
+ [
+ "/html/rendering/non-replaced-elements/lists/ul-type-unsupported-ref.html",
+ "=="
+ ]
+ ],
+ "url": "/html/rendering/non-replaced-elements/lists/ul-type-unsupported-invalid.html"
+ }
+ ],
"html/rendering/non-replaced-elements/lists/ul-type-unsupported-lower-alpha.html": [
{
"path": "html/rendering/non-replaced-elements/lists/ul-type-unsupported-lower-alpha.html",
@@ -39301,7 +39425,7 @@
}
]
},
- "rev": "78862c14a70cabb48c685144666912f08e726390",
+ "rev": "0d9238c8062f05a55898a0cb60dc0c353794d87a",
"url_base": "/",
"version": 2
}
diff --git a/tests/wpt/metadata/dom/nodes/attributes.html.ini b/tests/wpt/metadata/dom/nodes/attributes.html.ini
index db20558e450..709c462e36f 100644
--- a/tests/wpt/metadata/dom/nodes/attributes.html.ini
+++ b/tests/wpt/metadata/dom/nodes/attributes.html.ini
@@ -27,3 +27,12 @@
[Own property correctness with two namespaced attributes with the same name-with-prefix]
expected: FAIL
+ [setAttributeNode, if it fires mutation events, should fire one with the new node when resetting an existing attribute (outer shell)]
+ expected: FAIL
+
+ [setAttributeNode called with an Attr that has the same name as an existing one should not change attribute order]
+ expected: FAIL
+
+ [Own property names should only include all-lowercase qualified names for an HTML element in an HTML document]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/html/infrastructure/urls/terminology-0/document-base-url.html.ini b/tests/wpt/metadata/html/infrastructure/urls/terminology-0/document-base-url.html.ini
index 04075617de2..7f5fa8cfda6 100644
--- a/tests/wpt/metadata/html/infrastructure/urls/terminology-0/document-base-url.html.ini
+++ b/tests/wpt/metadata/html/infrastructure/urls/terminology-0/document-base-url.html.ini
@@ -12,3 +12,6 @@
[about:blank with a base element.]
expected: FAIL
+ [The base URL of an iframe srcdoc document with a tag should be set by that tag.]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/html/syntax/serializing-xml-fragments/outerHTML.html.ini b/tests/wpt/metadata/html/syntax/serializing-xml-fragments/outerHTML.html.ini
new file mode 100644
index 00000000000..a7cb4f2e878
--- /dev/null
+++ b/tests/wpt/metadata/html/syntax/serializing-xml-fragments/outerHTML.html.ini
@@ -0,0 +1,332 @@
+[outerHTML.html]
+ type: testharness
+ [Node for a]
+ expected: FAIL
+
+ [Node for abbr]
+ expected: FAIL
+
+ [Node for address]
+ expected: FAIL
+
+ [Node for article]
+ expected: FAIL
+
+ [Node for aside]
+ expected: FAIL
+
+ [Node for audio]
+ expected: FAIL
+
+ [Node for b]
+ expected: FAIL
+
+ [Node for bdi]
+ expected: FAIL
+
+ [Node for bdo]
+ expected: FAIL
+
+ [Node for blockquote]
+ expected: FAIL
+
+ [Node for body]
+ expected: FAIL
+
+ [Node for button]
+ expected: FAIL
+
+ [Node for canvas]
+ expected: FAIL
+
+ [Node for caption]
+ expected: FAIL
+
+ [Node for cite]
+ expected: FAIL
+
+ [Node for code]
+ expected: FAIL
+
+ [Node for colgroup]
+ expected: FAIL
+
+ [Node for command]
+ expected: FAIL
+
+ [Node for datalist]
+ expected: FAIL
+
+ [Node for dd]
+ expected: FAIL
+
+ [Node for del]
+ expected: FAIL
+
+ [Node for details]
+ expected: FAIL
+
+ [Node for dfn]
+ expected: FAIL
+
+ [Node for dialog]
+ expected: FAIL
+
+ [Node for div]
+ expected: FAIL
+
+ [Node for dl]
+ expected: FAIL
+
+ [Node for dt]
+ expected: FAIL
+
+ [Node for em]
+ expected: FAIL
+
+ [Node for fieldset]
+ expected: FAIL
+
+ [Node for figcaption]
+ expected: FAIL
+
+ [Node for figure]
+ expected: FAIL
+
+ [Node for footer]
+ expected: FAIL
+
+ [Node for form]
+ expected: FAIL
+
+ [Node for h1]
+ expected: FAIL
+
+ [Node for h2]
+ expected: FAIL
+
+ [Node for h3]
+ expected: FAIL
+
+ [Node for h4]
+ expected: FAIL
+
+ [Node for h5]
+ expected: FAIL
+
+ [Node for h6]
+ expected: FAIL
+
+ [Node for head]
+ expected: FAIL
+
+ [Node for header]
+ expected: FAIL
+
+ [Node for hgroup]
+ expected: FAIL
+
+ [Node for html]
+ expected: FAIL
+
+ [Node for i]
+ expected: FAIL
+
+ [Node for iframe]
+ expected: FAIL
+
+ [Node for ins]
+ expected: FAIL
+
+ [Node for kbd]
+ expected: FAIL
+
+ [Node for label]
+ expected: FAIL
+
+ [Node for legend]
+ expected: FAIL
+
+ [Node for li]
+ expected: FAIL
+
+ [Node for map]
+ expected: FAIL
+
+ [Node for mark]
+ expected: FAIL
+
+ [Node for menu]
+ expected: FAIL
+
+ [Node for meter]
+ expected: FAIL
+
+ [Node for nav]
+ expected: FAIL
+
+ [Node for noscript]
+ expected: FAIL
+
+ [Node for object]
+ expected: FAIL
+
+ [Node for ol]
+ expected: FAIL
+
+ [Node for optgroup]
+ expected: FAIL
+
+ [Node for option]
+ expected: FAIL
+
+ [Node for output]
+ expected: FAIL
+
+ [Node for p]
+ expected: FAIL
+
+ [Node for pre]
+ expected: FAIL
+
+ [Node for progress]
+ expected: FAIL
+
+ [Node for q]
+ expected: FAIL
+
+ [Node for rp]
+ expected: FAIL
+
+ [Node for rt]
+ expected: FAIL
+
+ [Node for ruby]
+ expected: FAIL
+
+ [Node for s]
+ expected: FAIL
+
+ [Node for samp]
+ expected: FAIL
+
+ [Node for script]
+ expected: FAIL
+
+ [Node for section]
+ expected: FAIL
+
+ [Node for select]
+ expected: FAIL
+
+ [Node for small]
+ expected: FAIL
+
+ [Node for span]
+ expected: FAIL
+
+ [Node for strong]
+ expected: FAIL
+
+ [Node for style]
+ expected: FAIL
+
+ [Node for sub]
+ expected: FAIL
+
+ [Node for summary]
+ expected: FAIL
+
+ [Node for sup]
+ expected: FAIL
+
+ [Node for table]
+ expected: FAIL
+
+ [Node for tbody]
+ expected: FAIL
+
+ [Node for td]
+ expected: FAIL
+
+ [Node for textarea]
+ expected: FAIL
+
+ [Node for tfoot]
+ expected: FAIL
+
+ [Node for th]
+ expected: FAIL
+
+ [Node for thead]
+ expected: FAIL
+
+ [Node for time]
+ expected: FAIL
+
+ [Node for title]
+ expected: FAIL
+
+ [Node for tr]
+ expected: FAIL
+
+ [Node for u]
+ expected: FAIL
+
+ [Node for ul]
+ expected: FAIL
+
+ [Node for var]
+ expected: FAIL
+
+ [Node for video]
+ expected: FAIL
+
+ [Node for data]
+ expected: FAIL
+
+ [Node for area]
+ expected: FAIL
+
+ [Node for base]
+ expected: FAIL
+
+ [Node for br]
+ expected: FAIL
+
+ [Node for col]
+ expected: FAIL
+
+ [Node for embed]
+ expected: FAIL
+
+ [Node for hr]
+ expected: FAIL
+
+ [Node for img]
+ expected: FAIL
+
+ [Node for input]
+ expected: FAIL
+
+ [Node for keygen]
+ expected: FAIL
+
+ [Node for link]
+ expected: FAIL
+
+ [Node for meta]
+ expected: FAIL
+
+ [Node for param]
+ expected: FAIL
+
+ [Node for source]
+ expected: FAIL
+
+ [Node for track]
+ expected: FAIL
+
+ [Node for wbr]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/mozilla-sync b/tests/wpt/metadata/mozilla-sync
index 288dbfe1448..7037532a549 100644
--- a/tests/wpt/metadata/mozilla-sync
+++ b/tests/wpt/metadata/mozilla-sync
@@ -1 +1 @@
-ce0b89d310212aaaa66b759c7c2548fb2f9a2738
\ No newline at end of file
+8a1d0a8f3e4206c98f35a4bba98fc26237c1f906
\ No newline at end of file
diff --git a/tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/106.html.ini b/tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/106-import.html.ini
similarity index 82%
rename from tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/106.html.ini
rename to tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/106-import.html.ini
index 1c4607ae45a..e138b39ddec 100644
--- a/tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/106.html.ini
+++ b/tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/106-import.html.ini
@@ -1,4 +1,4 @@
-[106.html]
+[106-import.html]
type: testharness
[ scheduler: stylesheets blocking scripts]
expected: FAIL
diff --git a/tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/107.html.ini b/tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/107-import.html.ini
similarity index 84%
rename from tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/107.html.ini
rename to tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/107-import.html.ini
index 1ed3d334188..d16db9574e6 100644
--- a/tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/107.html.ini
+++ b/tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/107-import.html.ini
@@ -1,4 +1,4 @@
-[107.html]
+[107-import.html]
type: testharness
[ scheduler: stylesheets blocking scripts document.write]
expected: FAIL
diff --git a/tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/107-noimport.html.ini b/tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/107-noimport.html.ini
new file mode 100644
index 00000000000..1437acb3511
--- /dev/null
+++ b/tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/107-noimport.html.ini
@@ -0,0 +1,5 @@
+[107-noimport.html]
+ type: testharness
+ [ scheduler: stylesheets blocking scripts document.write]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/websockets/Secure-Close-server-initiated-close.htm.ini b/tests/wpt/metadata/websockets/Secure-Close-server-initiated-close.htm.ini
deleted file mode 100644
index 2aec96f8c40..00000000000
--- a/tests/wpt/metadata/websockets/Secure-Close-server-initiated-close.htm.ini
+++ /dev/null
@@ -1,6 +0,0 @@
-[Secure-Close-server-initiated-close.htm]
- type: testharness
- expected: TIMEOUT
- [W3C WebSocket API - Create Secure WebSocket - Server initiated Close - Client sends back a CLOSE - readyState should be in CLOSED state and wasClean is TRUE - Connection should be closed]
- expected: NOTRUN
-
diff --git a/tests/wpt/web-platform-tests/dom/nodes/attributes.html b/tests/wpt/web-platform-tests/dom/nodes/attributes.html
index 2578b51f7a3..e331389ff85 100644
--- a/tests/wpt/web-platform-tests/dom/nodes/attributes.html
+++ b/tests/wpt/web-platform-tests/dom/nodes/attributes.html
@@ -465,6 +465,60 @@ test(function() {
assert_throws("INUSE_ATTRIBUTE_ERR", function(){el2.setAttributeNode(attrNode)});
}, "setAttributeNode on bound attribute should throw InUseAttributeError")
+// Have to use an async_test to see what a DOMAttrModified listener sees,
+// because otherwise the event dispatch code will swallow our exceptions. And
+// we want to make sure this test always happens, even when no mutation events
+// run.
+var setAttributeNode_mutation_test = async_test("setAttributeNode, if it fires mutation events, should fire one with the new node when resetting an existing attribute");
+
+test(function(){
+ var el = document.createElement("div")
+ var attrNode1 = document.createAttribute("foo");
+ attrNode1.value = "bar";
+ el.setAttributeNode(attrNode1);
+ var attrNode2 = document.createAttribute("foo");
+ attrNode2.value = "baz";
+
+ el.addEventListener("DOMAttrModified", function(e) {
+ // If this never gets called, that's OK, I guess. But if it gets called, it
+ // better represent a single modification with attrNode2 as the relatedNode.
+ // We have to do an inner test() call here, because otherwise the exceptions
+ // our asserts trigger will get swallowed by the event dispatch code.
+ setAttributeNode_mutation_test.step(function() {
+ assert_equals(e.attrName, "foo");
+ assert_equals(e.attrChange, MutationEvent.MODIFICATION);
+ assert_equals(e.prevValue, "bar");
+ assert_equals(e.newValue, "baz");
+ assert_equals(e.relatedNode, attrNode2);
+ });
+ });
+
+ var oldNode = el.setAttributeNode(attrNode2);
+ assert_equals(oldNode, attrNode1,
+ "Must return the old attr node from a setAttributeNode call");
+}, "setAttributeNode, if it fires mutation events, should fire one with the new node when resetting an existing attribute (outer shell)");
+setAttributeNode_mutation_test.done();
+
+test(function(){
+ var el = document.createElement("div")
+ el.setAttribute("a", "b");
+ el.setAttribute("c", "d");
+
+ assert_array_equals(Array.prototype.map.call(el.attributes, function(a) { return a.name }),
+ ["a", "c"]);
+ assert_array_equals(Array.prototype.map.call(el.attributes, function(a) { return a.value }),
+ ["b", "d"]);
+
+ var attrNode = document.createAttribute("a");
+ attrNode.value = "e";
+ el.setAttributeNode(attrNode);
+
+ assert_array_equals(Array.prototype.map.call(el.attributes, function(a) { return a.name }),
+ ["a", "c"]);
+ assert_array_equals(Array.prototype.map.call(el.attributes, function(a) { return a.value }),
+ ["e", "d"]);
+}, "setAttributeNode called with an Attr that has the same name as an existing one should not change attribute order");
+
test(function() {
var el = document.createElement("div");
el.setAttribute("foo", "bar");
@@ -537,6 +591,10 @@ test(function() {
["0", "1", "2"])
assert_array_equals(Object.getOwnPropertyNames(el.attributes),
["0", "1", "2", "a", "b"])
+ for (var propName of Object.getOwnPropertyNames(el.attributes)) {
+ assert_true(el.attributes[propName] instanceof Attr,
+ "el.attributes has an Attr for property name " + propName);
+ }
}, "Own property correctness with non-namespaced attribute before same-name namespaced one");
test(function() {
@@ -550,6 +608,10 @@ test(function() {
["0", "1", "2"])
assert_array_equals(Object.getOwnPropertyNames(el.attributes),
["0", "1", "2", "a", "b"])
+ for (var propName of Object.getOwnPropertyNames(el.attributes)) {
+ assert_true(el.attributes[propName] instanceof Attr,
+ "el.attributes has an Attr for property name " + propName);
+ }
}, "Own property correctness with namespaced attribute before same-name non-namespaced one");
test(function() {
@@ -563,5 +625,59 @@ test(function() {
["0", "1", "2"])
assert_array_equals(Object.getOwnPropertyNames(el.attributes),
["0", "1", "2", "a:b", "c:d"])
+ for (var propName of Object.getOwnPropertyNames(el.attributes)) {
+ assert_true(el.attributes[propName] instanceof Attr,
+ "el.attributes has an Attr for property name " + propName);
+ }
}, "Own property correctness with two namespaced attributes with the same name-with-prefix");
+
+test(function() {
+ var el = document.createElement("div");
+ el.setAttributeNS("foo", "A:B", "");
+ el.setAttributeNS("bar", "c:D", "");
+ el.setAttributeNS("baz", "e:F", "");
+ el.setAttributeNS("qux", "g:h", "");
+ el.setAttributeNS("", "I", "");
+ el.setAttributeNS("", "j", "");
+ assert_array_equals(Object.getOwnPropertyNames(el.attributes),
+ ["0", "1", "2", "3", "4", "5", "g:h", "j"])
+ for (var propName of Object.getOwnPropertyNames(el.attributes)) {
+ assert_true(el.attributes[propName] instanceof Attr,
+ "el.attributes has an Attr for property name " + propName);
+ }
+}, "Own property names should only include all-lowercase qualified names for an HTML element in an HTML document");
+
+test(function() {
+ var el = document.createElementNS("", "div");
+ el.setAttributeNS("foo", "A:B", "");
+ el.setAttributeNS("bar", "c:D", "");
+ el.setAttributeNS("baz", "e:F", "");
+ el.setAttributeNS("qux", "g:h", "");
+ el.setAttributeNS("", "I", "");
+ el.setAttributeNS("", "j", "");
+ assert_array_equals(Object.getOwnPropertyNames(el.attributes),
+ ["0", "1", "2", "3", "4", "5", "A:B", "c:D", "e:F", "g:h", "I", "j"])
+ for (var propName of Object.getOwnPropertyNames(el.attributes)) {
+ assert_true(el.attributes[propName] instanceof Attr,
+ "el.attributes has an Attr for property name " + propName);
+ }
+}, "Own property names should include all qualified names for a non-HTML element in an HTML document");
+
+test(function() {
+ var doc = document.implementation.createDocument(null, "");
+ assert_equals(doc.contentType, "application/xml");
+ var el = doc.createElementNS("http://www.w3.org/1999/xhtml", "div");
+ el.setAttributeNS("foo", "A:B", "");
+ el.setAttributeNS("bar", "c:D", "");
+ el.setAttributeNS("baz", "e:F", "");
+ el.setAttributeNS("qux", "g:h", "");
+ el.setAttributeNS("", "I", "");
+ el.setAttributeNS("", "j", "");
+ assert_array_equals(Object.getOwnPropertyNames(el.attributes),
+ ["0", "1", "2", "3", "4", "5", "A:B", "c:D", "e:F", "g:h", "I", "j"])
+ for (var propName of Object.getOwnPropertyNames(el.attributes)) {
+ assert_true(el.attributes[propName] instanceof Attr,
+ "el.attributes has an Attr for property name " + propName);
+ }
+}, "Own property names should include all qualified names for an HTML element in a non-HTML document");
diff --git a/tests/wpt/web-platform-tests/html/infrastructure/urls/terminology-0/document-base-url.html b/tests/wpt/web-platform-tests/html/infrastructure/urls/terminology-0/document-base-url.html
index 34bd0ab040f..ee9d7264812 100644
--- a/tests/wpt/web-platform-tests/html/infrastructure/urls/terminology-0/document-base-url.html
+++ b/tests/wpt/web-platform-tests/html/infrastructure/urls/terminology-0/document-base-url.html
@@ -77,5 +77,17 @@
iframe.setAttribute("srcdoc", "
foobar
");
document.body.appendChild(iframe);
}, "The fallback base URL of an iframe srcdoc document is the document base URL of the document's browsing context's browsing context container's document.");
+
+ async_test(function () {
+ var iframe = document.createElement("iframe");
+ iframe.onload = this.step_func_done(function () {
+ var doc = iframe.contentDocument;
+ assert_resolve_url(doc, location.href.replace("/document-base-url.html", "/sub"));
+ assert_equals(doc.baseURI, document.baseURI.replace("/document-base-url.html", "/sub/"),
+ "The srcdoc document's base URL should be set by the tag.");
+ });
+ iframe.setAttribute("srcdoc", "foobar
");
+ document.body.appendChild(iframe);
+ }, "The base URL of an iframe srcdoc document with a tag should be set by that tag.");