sxg-sw-register.tentative.https.html (896B)
1 <!DOCTYPE html> 2 <title>Service worker registration from signed exchange</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 = 11 get_host_info().HTTPS_ORIGIN + 12 '/signed-exchange/resources/sxg/register-sw-from-sxg.sxg'; 13 const message = await openSXGInIframeAndWaitForMessage(t, sxgUrl); 14 assert_equals(message.location, 15 get_host_info().HTTPS_ORIGIN + 16 '/signed-exchange/resources/register-sw-from-sxg.html'); 17 assert_false(message.is_fallback); 18 19 assert_equals(message.err, undefined); 20 assert_equals(message.iframe_body, 'Generated by service worker'); 21 }, 'Service worker registration from signed exchange'); 22 </script> 23 </body>