navigation-unload-cross-origin.sub.window.js (485B)
1 // META: title=Cross-origin navigation started from unload handler must be ignored 2 // META: script=../resources/helpers.js 3 4 promise_test(async () => { 5 const iframe = await addIframe(); 6 7 iframe.contentWindow.addEventListener("unload", () => { 8 iframe.contentWindow.location.href = "//{{hosts[][www]}}/common/blank.html?fail"; 9 }); 10 11 iframe.src = "/common/blank.html?pass"; 12 13 await waitForIframeLoad(iframe); 14 assert_equals(iframe.contentWindow.location.search, "?pass"); 15 });