tor-browser

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

loaf-iframe-self.html (1234B)


      1 <!DOCTYPE HTML>
      2 <meta charset=utf-8>
      3 <title>Long Animation Frame Timing: iframes (self)</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 
     16 for (const origin of ["ORIGIN", "REMOTE_ORIGIN", "HTTP_NOTSAMESITE_ORIGIN"]) {
     17    promise_test(async t => {
     18        const [executor] = await prepare_exec_iframe(t, host_info[origin]);
     19        const entry = await executor.execute_script(async (duration) => {
     20            const entryPromise = new Promise(resolve => new PerformanceObserver(list => {
     21                resolve(list.getEntries(0));
     22            }).observe({entryTypes: ["long-animation-frame"]}));
     23            const deadline = performance.now() + duration;
     24            while (performance.now() < deadline) {}
     25            return entryPromise;
     26        }, [very_long_frame_duration]);
     27    }, `frames receive own long animation frames (${origin})`);
     28 }
     29 
     30 </script>
     31 </body>