relative-url-static-element.https.tentative.html (1235B)
1 <!DOCTYPE html> 2 <title>WebBundle subresource loading with relative URLs for static elements</title> 3 <link 4 rel="help" 5 href="https://github.com/WICG/webpackage/blob/main/explainers/subresource-loading.md" 6 /> 7 <script src="/resources/testharness.js"></script> 8 <script src="/resources/testharnessreport.js"></script> 9 <body> 10 <script type="webbundle"> 11 { 12 "source": "../resources/wbn/static-element.wbn", 13 "resources": [ 14 "static-element/resources/script.js" 15 ], 16 "scopes": [ 17 "static-element/scopes" 18 ] 19 } 20 </script> 21 <script src="../resources/wbn/static-element/resources/script.js"></script> 22 <script src="../resources/wbn/static-element/scopes/script.js"></script> 23 <script src="../resources/wbn/static-element/out-of-scope/script.js"></script> 24 <script> 25 setup(() => { 26 assert_true(HTMLScriptElement.supports('webbundle')); 27 }); 28 promise_test(async () => { 29 assert_equals(resources_script_result, 'loaded from webbundle'); 30 assert_equals(scopes_script_result, 'loaded from webbundle'); 31 assert_equals(out_of_scope_script_result, 'loaded from network'); 32 }, 'Subresources from static elements should be loaded from web bundle.'); 33 </script> 34 </body>