longtask-detach-frame.html (750B)
1 <!DOCTYPE HTML> 2 <meta charset=utf-8> 3 <title>LongTask Timing: long task in nested child iframe</title> 4 <body> 5 6 <script src="/resources/testharness.js"></script> 7 <script src="/resources/testharnessreport.js"></script> 8 <script src="resources/utils.js"></script> 9 10 <h1>Long Tasks with detached iframe</h1> 11 <div id="log"></div> 12 <script> 13 promise_test(async t => { 14 assert_implements(window.PerformanceLongTaskTiming, 'Longtasks are not supported.'); 15 const iframe = document.createElement("iframe"); 16 document.body.appendChild(iframe); 17 t.add_cleanup(() => iframe.remove()); 18 t.step_timeout(() => { 19 busyWait(); 20 iframe.remove(); 21 }); 22 }, 'Performance longtask entries dont crash when a frame is detached.'); 23 </script> 24 25 </body>