tor-browser

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

loaf-popup.html (929B)


      1 <!DOCTYPE HTML>
      2 <meta charset=utf-8>
      3 <title>Long Animation Frame Timing: popups</title>
      4 <meta name="timeout" content="long">
      5 <body>
      6 <script src="/resources/testharness.js"></script>
      7 <script src="/resources/testharnessreport.js"></script>
      8 <script src="/common/get-host-info.sub.js"></script>
      9 <script src="/common/utils.js"></script>
     10 <script src="/common/dispatcher/dispatcher.js"></script>
     11 <script src="resources/utils.js"></script>
     12 <div id="log"></div>
     13 <script>
     14 const host_info = get_host_info();
     15 const { ORIGIN } = host_info;
     16 
     17 promise_test(async t => {
     18    const [executor] = await prepare_exec_popup(t, ORIGIN);
     19    await expect_no_long_frame(() => executor.execute_script((duration) => {
     20        const deadline = performance.now() + duration;
     21        while (performance.now() < deadline) {}
     22    }, [very_long_frame_duration]), t);
     23 }, 'A long busy wait in a same-origin popup is a not long animation frame');
     24 </script>
     25 </body>