loaf-iframe-crossorigin.html (1008B)
1 <!DOCTYPE HTML> 2 <meta charset=utf-8> 3 <title>Long Animation Frame Timing: iframes (cross-origin)</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 type of ["REMOTE_ORIGIN", "HTTP_NOTSAMESITE_ORIGIN"]) { 17 promise_test(async t => { 18 const [executor] = await prepare_exec_iframe(t, host_info[type]); 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 ${type} iframe is not a long animation frame`); 24 } 25 26 </script> 27 </body>