multiple-early-hints-responses.html (683B)
1 <!DOCTYPE html> 2 <meta charset=utf-8> 3 <script src="/resources/testharness.js"></script> 4 <script src="/resources/testharnessreport.js"></script> 5 <script src="early-hints-helpers.sub.js"></script> 6 <body> 7 <script> 8 promise_test(async (t) => { 9 const params = new URLSearchParams(window.location.search); 10 11 const first_preload = params.get("first-preload"); 12 await fetchScript(first_preload); 13 assert_true(isPreloadedByEarlyHints(first_preload)); 14 15 const second_preload = params.get("second-preload"); 16 await fetchScript(second_preload); 17 assert_false(isPreloadedByEarlyHints(second_preload)); 18 }, "Only the first early hints response is processed"); 19 </script> 20 </body>