sxg-prefetch-merkle-integrity-error.tentative.html (937B)
1 <!DOCTYPE html> 2 <title>Prefetching SignedHTTPExchange with payload integrity error should fail</title> 3 <script src="/resources/testharness.js"></script> 4 <script src="/resources/testharnessreport.js"></script> 5 <script src="/common/get-host-info.sub.js"></script> 6 <script src="./resources/sxg-util.js"></script> 7 <body> 8 <script> 9 promise_test(async (t) => { 10 const sxgUrl = get_host_info().HTTPS_ORIGIN + '/signed-exchange/resources/sxg/sxg-merkle-integrity-error.sxg'; 11 await new Promise(resolve => { 12 const link = document.createElement('link'); 13 link.rel = 'prefetch'; 14 link.href = sxgUrl; 15 link.addEventListener('error', t.step_func(() => { 16 resolve(); 17 })); 18 link.addEventListener('load', t.step_func(() => { 19 assert_unreached('Prefetch should fail'); 20 })); 21 document.body.appendChild(link); 22 }); 23 }, "Prefetching SignedHTTPExchange with payload integrity error should fail"); 24 25 </script> 26 </body>