Bug 1527157 [wpt PR 15268] - Add test for contentDocument behaviour during parsing, a=testonly
☠☠ backed out by 749b314d6c28 ☠ ☠
authorJosh Matthews <josh@joshmatthews.net>
Tue, 19 Feb 2019 14:39:13 +0000
changeset 460337 d9c437f2f5f73e52fe4ff4fff2523a3c8b105654
parent 460336 f5f376dc06dcd2fd77aa9c135d3922a4923b387e
child 460338 cc6673d871d1996266f8bf9dbc787cb45aa8a0fb
push id112074
push userwptsync@mozilla.com
push dateThu, 21 Feb 2019 19:59:15 +0000
treeherdermozilla-inbound@a15983fcecca [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1527157, 15268
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1527157 [wpt PR 15268] - Add test for contentDocument behaviour during parsing, a=testonly Automatic update from web-platform-tests Verify that contentDocument is updated during nested browsing context document parsing. -- wpt-commits: ae6d56308684b97f30a01b455ce3eb205cba79aa wpt-pr: 15268
testing/web-platform/tests/html/semantics/embedded-content/the-iframe-element/content_document_changes_only_after_load_matures.html
testing/web-platform/tests/html/semantics/embedded-content/the-iframe-element/support/iframe-that-checks-contentDocument.html
--- a/testing/web-platform/tests/html/semantics/embedded-content/the-iframe-element/content_document_changes_only_after_load_matures.html
+++ b/testing/web-platform/tests/html/semantics/embedded-content/the-iframe-element/content_document_changes_only_after_load_matures.html
@@ -3,19 +3,26 @@
 <title>Iframe's contentDocument should only change after its pending load has matured.</title>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <body></body>
 <script>
 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.");
 </script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/html/semantics/embedded-content/the-iframe-element/support/iframe-that-checks-contentDocument.html
@@ -0,0 +1,3 @@
+<script>
+  parent.testContentDocument();
+</script>