Update web-platform-tests to revision 7cb66930f16381536cec572cd3f4f86c7bbb6787

This commit is contained in:
WPT Sync Bot 2020-05-19 08:19:06 +00:00
parent c183f95297
commit 9cff065d01
80 changed files with 1357 additions and 359 deletions

View file

@ -6,19 +6,11 @@ for (const ev of ["unload", "beforeunload", "pagehide"]) {
t.add_cleanup(() => iframe.remove());
iframe.src = "/common/blank.html";
iframe.onload = t.step_func(() => {
iframe.contentWindow.addEventListener(ev, t.step_func(() => {
// Here, the entry settings object could still be the iframe's. Delay
// it in such a way that ensures the entry settings object is the
// top-level page's, but without delaying too much that the
// ignore-opens-during-unload counter becomes decremented. A microtask
// is perfect as it's executed immediately in "clean up after running
// script".
Promise.resolve().then(t.step_func_done(() => {
const origURL = iframe.contentDocument.URL;
assertDocumentIsReadyForSideEffectsTest(iframe.contentDocument, `ignore-opens-during-unload counter is greater than 0 during ${ev} event`);
assert_equals(iframe.contentDocument.open(), iframe.contentDocument);
assertOpenHasNoSideEffects(iframe.contentDocument, origURL, `ignore-opens-during-unload counter is greater than 0 during ${ev} event`);
}));
iframe.contentWindow.addEventListener(ev, t.step_func_done(() => {
const origURL = iframe.contentDocument.URL;
assertDocumentIsReadyForSideEffectsTest(iframe.contentDocument, `ignore-opens-during-unload counter is greater than 0 during ${ev} event`);
assert_equals(iframe.contentDocument.open(), iframe.contentDocument);
assertOpenHasNoSideEffects(iframe.contentDocument, origURL, `ignore-opens-during-unload counter is greater than 0 during ${ev} event`);
}));
iframe.src = "about:blank";
});