Bug 1458554 [wpt PR 10773] - HTML: document.open() and the unload event, a=testonly
authorAnne van Kesteren <annevk@annevk.nl>
Wed, 22 Aug 2018 13:17:06 +0000
changeset 481368 7a308e5f78c2792c423ec0b5d7e6d6bbafdf230a
parent 481367 a8facd78c24282a792310cb154aae29c531a116a
child 481369 5e452420d498274a79b91e9a7281f83202066a95
push id232
push userfmarier@mozilla.com
push dateWed, 05 Sep 2018 20:45:54 +0000
reviewerstestonly
bugs1458554, 10773
milestone63.0a1
Bug 1458554 [wpt PR 10773] - HTML: document.open() and the unload event, a=testonly Automatic update from web-platform-testsHTML: document.open() and the unload events (#10773) For https://github.com/whatwg/html/pull/3918. -- wpt-commits: 23c21d2e0e6a8035ddfab91e33c54103d859ffca wpt-pr: 10773
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/unload.window.js
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -364902,16 +364902,22 @@
     ]
    ],
    "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/type-argument.window.js": [
     [
      "/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/type-argument.window.html",
      {}
     ]
    ],
+   "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/unload.window.js": [
+    [
+     "/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/unload.window.html",
+     {}
+    ]
+   ],
    "html/webappapis/microtask-queuing/queue-microtask-exceptions.any.js": [
     [
      "/html/webappapis/microtask-queuing/queue-microtask-exceptions.any.html",
      {}
     ],
     [
      "/html/webappapis/microtask-queuing/queue-microtask-exceptions.any.sharedworker.html",
      {}
@@ -543844,17 +543850,17 @@
    "d76345df01f14927f96f79834113e09cc10af813",
    "testharness"
   ],
   "css/css-shapes/shape-outside/values/shape-outside-shape-notation-000.html": [
    "c84f934bcf381a27bab055d214da7e69d38679d4",
    "testharness"
   ],
   "css/css-shapes/shape-outside/values/support/parsing-utils.js": [
-   "68b0c1b1f7c4641cc8e28eb0dca52163b71eb1f7",
+   "06007f50939e251851be58a896208d03bb58d0dd",
    "support"
   ],
   "css/css-shapes/spec-examples/reference/shape-outside-001-ref.html": [
    "b175d5503835ec135027ea2df690134d971201de",
    "support"
   ],
   "css/css-shapes/spec-examples/reference/shape-outside-004-ref.html": [
    "0a62f3b8c88c4643c81b7667cc3d8852c6cdd0b0",
@@ -596120,17 +596126,17 @@
    "ee9d726481287a10f4048f307d74333e787fbca2",
    "testharness"
   ],
   "html/infrastructure/urls/terminology-0/multiple-base.sub.html": [
    "49c428c5bea12c200c155cdf70135f209b87c004",
    "testharness"
   ],
   "html/input/the-disabled-attribute/number-disabled.html": [
-   "2472e56c4ecfce73d92b653951275099500128b6",
+   "11cb82fdda60d69f8b1dd7709ea99210238123f8",
    "testharness"
   ],
   "html/input/the-placeholder-attribute/multiline-cr.html": [
    "4184ab2c5ce2a0b42ada8f97e1c32681fc37f052",
    "reftest"
   ],
   "html/input/the-placeholder-attribute/multiline-crlf.html": [
    "50c91fbe35e572e923b92f9d606fa13fcbfb0aae",
@@ -605459,16 +605465,20 @@
   "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/type-argument-plaintext.window.js": [
    "ab1d9706a46a848f753e6ad25ad86454d92b8f1d",
    "testharness"
   ],
   "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/type-argument.window.js": [
    "9174008da33b7faeba91169efe3ace6e1dc87704",
    "testharness"
   ],
+  "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/unload.window.js": [
+   "e275a4987a0859b160a0f91de6c8896b90bdab31",
+   "testharness"
+  ],
   "html/webappapis/microtask-queuing/queue-microtask-exceptions.any.js": [
    "01f32ac9ba14962fa99d4b263a8ca0f5a0daa161",
    "testharness"
   ],
   "html/webappapis/microtask-queuing/queue-microtask.any.js": [
    "b39931719a88ad525511d8f8745a9b752a6a6465",
    "testharness"
   ],
@@ -646392,17 +646402,17 @@
    "97c7214ac75fd77ad3fc2b3c0df12c3d850a0936",
    "testharness"
   ],
   "web-animations/timing-model/animations/play-states.html": [
    "5d8fdeac6ecc5c2908a2cfe1af9d2176359af0ad",
    "testharness"
   ],
   "web-animations/timing-model/animations/playing-an-animation.html": [
-   "0d47ef6ec2aba7b56c771fc067a347ceeafcce1f",
+   "1477261e6bc6227598b4e80475a66aa95fe5d15c",
    "testharness"
   ],
   "web-animations/timing-model/animations/reversing-an-animation.html": [
    "75fd9876c0495a8bd0096d2f976a920d3d7e5a05",
    "testharness"
   ],
   "web-animations/timing-model/animations/seamlessly-updating-the-playback-rate-of-an-animation.html": [
    "41e9776c1361ebbcb86ae026b0e8c17fa6fccc73",
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/unload.window.js
@@ -0,0 +1,19 @@
+// In an earlier version of the HTML Standard, document open steps had "unload
+// document" as a step. Test that this no longer happens.
+
+async_test(t => {
+  const frame = document.body.appendChild(document.createElement("iframe"));
+  t.add_cleanup(() => frame.remove());
+  frame.src = "/common/blank.html";
+  frame.onload = t.step_func(() => {
+    frame.contentWindow.onpagehide = t.unreached_func("onpagehide got called");
+    frame.contentDocument.onvisibilitychange = t.unreached_func("onvisibilitychange got called");
+    frame.contentWindow.onunload = t.unreached_func("onunload got called");
+    frame.contentDocument.open();
+    t.step_timeout(t.step_func_done(() => {
+      // If none of the three events have been fired by this point, we consider
+      // the test a success. `frame.remove()` above will allow the `load` event
+      // to be fired on the top-level Window, thus unblocking testharness.
+    }), 500);
+  });
+}, "document.open(): Do not fire pagehide, visibilitychange, or unload events");