diff --git a/tests/wpt/metadata/MANIFEST.json b/tests/wpt/metadata/MANIFEST.json index 9fba8ce8846..a3118a0157b 100644 --- a/tests/wpt/metadata/MANIFEST.json +++ b/tests/wpt/metadata/MANIFEST.json @@ -298855,6 +298855,11 @@ {} ] ], + "html/semantics/embedded-content/the-iframe-element/support/iframe-that-checks-contentDocument.html": [ + [ + {} + ] + ], "html/semantics/embedded-content/the-iframe-element/support/iframe-that-opens-modals.html": [ [ {} @@ -634124,7 +634129,7 @@ "testharness" ], "html/semantics/embedded-content/the-iframe-element/content_document_changes_only_after_load_matures.html": [ - "2cb85700230c038d020acd099008ef48cebf1a87", + "b657f26158a9c6526e3c734afb9ce2731e1b3dd4", "testharness" ], "html/semantics/embedded-content/the-iframe-element/cross_origin_child.html": [ @@ -634451,6 +634456,10 @@ "18ecdcb795c33d6ab7bbb43f647947defca5634d", "support" ], + "html/semantics/embedded-content/the-iframe-element/support/iframe-that-checks-contentDocument.html": [ + "bc35a977e8b27360f75a901d44fedf47ad496e37", + "support" + ], "html/semantics/embedded-content/the-iframe-element/support/iframe-that-opens-modals.html": [ "50f56c6278a77e5ff80e5036c7d600d0b1fa4b91", "support" diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/content_document_changes_only_after_load_matures.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/content_document_changes_only_after_load_matures.html index 2cb85700230..b657f26158a 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/content_document_changes_only_after_load_matures.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/content_document_changes_only_after_load_matures.html @@ -8,13 +8,20 @@ async_test(function(t) { var iframe = document.createElement("iframe"); document.body.appendChild(iframe); - iframe.onload = t.step_func(function() { - assert_true(iframe.contentDocument.location.toString().includes("support/blank.htm")); - t.done(); + var checkedDuringParse = false; + iframe.onload = t.step_func_done(function() { + testContentDocument(); + assert_true(checkedDuringParse); + }); + + let url = "support/iframe-that-checks-contentDocument.html"; + window.testContentDocument = t.step_func(function() { + assert_true(iframe.contentDocument.location.toString().includes(url)); + checkedDuringParse = true; }); assert_equals(iframe.contentDocument.location.toString(), "about:blank"); - iframe.src = "support/blank.htm?pipe=trickle(d2)"; + iframe.src = url + "?pipe=trickle(d2)"; // The location of the contentDocument should not change until the new document has matured. assert_equals(iframe.contentDocument.location.toString(), "about:blank"); }, "contentDocument should only change after a load matures."); diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-that-checks-contentDocument.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-that-checks-contentDocument.html new file mode 100644 index 00000000000..bc35a977e8b --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-that-checks-contentDocument.html @@ -0,0 +1,3 @@ +