tor-browser

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

pageswap-in-hidden-doc-should-skip-transition.html (1057B)


      1 <!DOCTYPE html>
      2 <title>Tests pageswap dispatch on hidden Documents</title>
      3 <link rel="help" href="https://drafts.csswg.org/css-view-transitions-2/">
      4 <script src="/resources/testharness.js"></script>
      5 <script src="/resources/testharnessreport.js"></script>
      6 <script src="/resources/testdriver.js"></script>
      7 <script src="/resources/testdriver-vendor.js"></script>
      8 <script>
      9  promise_test(async t => {
     10    let popup;
     11    onload = () => {
     12      // Need to restore this browser window once after the window got minimized.
     13      window.set_original_window_rect = rect => {
     14        t.add_cleanup(async () => {
     15          await test_driver.set_window_rect(rect);
     16        });
     17      };
     18      popup = window.open("resources/navigate-after-hide.html");
     19 
     20      t.add_cleanup(() => popup.close());
     21    };
     22 
     23   const result = await new Promise((resolve, reject) => {
     24      window.popup_done = resolve;
     25      window.popup_error = reject;
     26    });
     27    assert_equals(result, null);
     28  }, "Outbound cross-document view transition is not allowed when document is hidden");
     29 </script>