avoid-delaying-onload-link-modulepreload.html (859B)
1 <!DOCTYPE html> 2 <script src="/resources/testharness.js"></script> 3 <script src="/resources/testharnessreport.js"></script> 4 <script src="/preload/resources/preload_helper.js"></script> 5 <link rel=modulepreload href="resources/dummy.js?pipe=trickle(d5)"> 6 <script> 7 setup(() => { 8 const link = window.document.createElement("link"); 9 assert_implements( 10 'relList' in link, 11 'HTMLLinkElement.relList is not supported'); 12 13 assert_implements( 14 link.relList.supports("modulepreload"), 15 'modulepreload is not supported'); 16 }); 17 18 promise_test(async t => { 19 await new Promise(r => window.addEventListener("load", r)); 20 verifyNumberOfResourceTimingEntries("resources/dummy.js?pipe=trickle(d5)", 0); 21 }, "Fetching modulepreload should not block the window's load event"); 22 </script>