From 7e8624d9215224dde04c307df7df14e993f37d0a Mon Sep 17 00:00:00 2001
From: James Graham
Date: Wed, 20 Jan 2016 14:52:45 +0000
Subject: [PATCH 1/2] Update web-platform-tests to revision
0d9238c8062f05a55898a0cb60dc0c353794d87a
---
tests/wpt/metadata/MANIFEST.json | 134 ++-
tests/wpt/metadata/mozilla-sync | 2 +-
.../dom/nodes/attributes.html | 116 +++
.../urls/terminology-0/document-base-url.html | 12 +
.../lists/ol-type-unsupported-invalid.html | 6 +
.../lists/ul-type-unsupported-invalid.html | 7 +
.../html/syntax/html-element-list.js | 140 +++
.../serializing-html-fragments/outerHTML.html | 148 +---
.../serializing-xml-fragments/outerHTML.html | 38 +
.../WeakMap.prototype-properties.html | 30 +-
tests/wpt/web-platform-tests/lint.whitelist | 6 +-
.../{106.html => 106-import.html} | 0
.../Opera/script_scheduling/106-noimport.html | 20 +
.../{107.html => 107-import.html} | 2 +-
.../Opera/script_scheduling/107-noimport.html | 21 +
.../byte-length-queuing-strategy.https.html | 12 +
.../streams/byte-length-queuing-strategy.js | 107 +++
.../streams/count-queuing-strategy.https.html | 12 +
.../streams/count-queuing-strategy.js | 106 +++
.../bad-strategies.https.html | 12 +
.../readable-streams/bad-strategies.js | 176 ++++
.../bad-underlying-sources.https.html | 12 +
.../bad-underlying-sources.js | 383 ++++++++
.../readable-streams/brand-checks.https.html | 13 +
.../streams/readable-streams/brand-checks.js | 151 ++++
.../readable-streams/cancel.https.html | 14 +
.../streams/readable-streams/cancel.js | 242 +++++
...nt-queuing-strategy-integration.https.html | 12 +
.../count-queuing-strategy-integration.js | 213 +++++
.../garbage-collection.https.html | 13 +
.../readable-streams/garbage-collection.js | 75 ++
.../readable-streams/general.https.html | 14 +
.../streams/readable-streams/general.js | 831 ++++++++++++++++++
.../readable-streams/pipe-through.https.html | 13 +
.../streams/readable-streams/pipe-through.js | 108 +++
.../readable-stream-reader.https.html | 12 +
.../readable-stream-reader.js | 485 ++++++++++
.../streams/readable-streams/tee.https.html | 13 +
.../streams/readable-streams/tee.js | 254 ++++++
.../readable-streams/templated.https.html | 14 +
.../streams/readable-streams/templated.js | 148 ++++
.../streams/resources/rs-test-templates.js | 624 +++++++++++++
.../streams/resources/rs-utils.js | 185 ++++
.../streams/resources/test-initializer.js | 14 +
.../streams/resources/test-utils.js | 43 +
.../wpt/web-platform-tests/tools/lint/lint.py | 53 +-
.../mouse-events/click-on-body-manual.html | 53 ++
.../mouse-events/click-on-html-manual.html | 58 ++
.../web-animations/animation/constructor.html | 60 ++
.../keyframe-effect/constructor.html | 115 +--
.../keyframe-effect/getComputedTiming.html | 195 ++++
.../Secure-Close-server-initiated-close.htm | 2 +-
.../websockets/closing-handshake/002.html | 5 +-
.../websockets/closing-handshake/003.html | 8 +-
.../WebSocket/close/close-multiple.html | 4 +-
.../interfaces/WebSocket/send/010.html | 4 +-
.../websockets/security/001.html | 6 +-
57 files changed, 5290 insertions(+), 266 deletions(-)
create mode 100644 tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/lists/ol-type-unsupported-invalid.html
create mode 100644 tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/lists/ul-type-unsupported-invalid.html
create mode 100644 tests/wpt/web-platform-tests/html/syntax/html-element-list.js
create mode 100644 tests/wpt/web-platform-tests/html/syntax/serializing-xml-fragments/outerHTML.html
rename tests/wpt/web-platform-tests/old-tests/submission/Opera/script_scheduling/{106.html => 106-import.html} (100%)
create mode 100644 tests/wpt/web-platform-tests/old-tests/submission/Opera/script_scheduling/106-noimport.html
rename tests/wpt/web-platform-tests/old-tests/submission/Opera/script_scheduling/{107.html => 107-import.html} (86%)
create mode 100644 tests/wpt/web-platform-tests/old-tests/submission/Opera/script_scheduling/107-noimport.html
create mode 100644 tests/wpt/web-platform-tests/streams/byte-length-queuing-strategy.https.html
create mode 100644 tests/wpt/web-platform-tests/streams/byte-length-queuing-strategy.js
create mode 100644 tests/wpt/web-platform-tests/streams/count-queuing-strategy.https.html
create mode 100644 tests/wpt/web-platform-tests/streams/count-queuing-strategy.js
create mode 100644 tests/wpt/web-platform-tests/streams/readable-streams/bad-strategies.https.html
create mode 100644 tests/wpt/web-platform-tests/streams/readable-streams/bad-strategies.js
create mode 100644 tests/wpt/web-platform-tests/streams/readable-streams/bad-underlying-sources.https.html
create mode 100644 tests/wpt/web-platform-tests/streams/readable-streams/bad-underlying-sources.js
create mode 100644 tests/wpt/web-platform-tests/streams/readable-streams/brand-checks.https.html
create mode 100644 tests/wpt/web-platform-tests/streams/readable-streams/brand-checks.js
create mode 100644 tests/wpt/web-platform-tests/streams/readable-streams/cancel.https.html
create mode 100644 tests/wpt/web-platform-tests/streams/readable-streams/cancel.js
create mode 100644 tests/wpt/web-platform-tests/streams/readable-streams/count-queuing-strategy-integration.https.html
create mode 100644 tests/wpt/web-platform-tests/streams/readable-streams/count-queuing-strategy-integration.js
create mode 100644 tests/wpt/web-platform-tests/streams/readable-streams/garbage-collection.https.html
create mode 100644 tests/wpt/web-platform-tests/streams/readable-streams/garbage-collection.js
create mode 100644 tests/wpt/web-platform-tests/streams/readable-streams/general.https.html
create mode 100644 tests/wpt/web-platform-tests/streams/readable-streams/general.js
create mode 100644 tests/wpt/web-platform-tests/streams/readable-streams/pipe-through.https.html
create mode 100644 tests/wpt/web-platform-tests/streams/readable-streams/pipe-through.js
create mode 100644 tests/wpt/web-platform-tests/streams/readable-streams/readable-stream-reader.https.html
create mode 100644 tests/wpt/web-platform-tests/streams/readable-streams/readable-stream-reader.js
create mode 100644 tests/wpt/web-platform-tests/streams/readable-streams/tee.https.html
create mode 100644 tests/wpt/web-platform-tests/streams/readable-streams/tee.js
create mode 100644 tests/wpt/web-platform-tests/streams/readable-streams/templated.https.html
create mode 100644 tests/wpt/web-platform-tests/streams/readable-streams/templated.js
create mode 100644 tests/wpt/web-platform-tests/streams/resources/rs-test-templates.js
create mode 100644 tests/wpt/web-platform-tests/streams/resources/rs-utils.js
create mode 100644 tests/wpt/web-platform-tests/streams/resources/test-initializer.js
create mode 100644 tests/wpt/web-platform-tests/streams/resources/test-utils.js
create mode 100644 tests/wpt/web-platform-tests/uievents/order-of-events/mouse-events/click-on-body-manual.html
create mode 100644 tests/wpt/web-platform-tests/uievents/order-of-events/mouse-events/click-on-html-manual.html
create mode 100644 tests/wpt/web-platform-tests/web-animations/animation/constructor.html
create mode 100644 tests/wpt/web-platform-tests/web-animations/keyframe-effect/getComputedTiming.html
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 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.");