tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

navigation-unload-same-origin.window.js (466B)


      1 // META: title=Same-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 = "/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 });