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/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/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 thefoobar
"); + document.body.appendChild(iframe); + }, "The base URL of an iframe srcdoc document with a