loaf-stream-source-location.html (981B)
1 <!DOCTYPE HTML> 2 <meta charset=utf-8> 3 <title>Long Animation Frame Timing: source location extraction for streams</title> 4 <meta name="timeout" content="long"> 5 <script src="/resources/testharness.js"></script> 6 <script src="/resources/testharnessreport.js"></script> 7 <script src="resources/utils.js"></script> 8 9 <body> 10 <h1>Long Animation Frame: source location extraction for streams</h1> 11 <div id="log"></div> 12 <script> 13 14 promise_test(async t => { 15 const scriptLocation = new URL("resources/stream-promise-generates-loaf.js", location.href); 16 const [entry, script] = await expect_long_frame_with_script(() => { 17 const scriptElement = document.createElement("script"); 18 scriptElement.src = scriptLocation; 19 document.body.appendChild(scriptElement); 20 }, script => script.invoker === "StreamPromise.resolve.then", t); 21 22 assert_true(script.sourceURL.includes("stream-promise-generates-loaf.js")); 23 }, "Source location should be extracted for stream promises"); 24 25 </script> 26 </body>