relative-url-in-web-bundle-cors.https.tentative.sub.html (2732B)
1 <!DOCTYPE html> 2 <title>Relative Url in cross origin web bundle</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 <script src="../resources/test-helpers.js"></script> 10 <body> 11 <script> 12 setup(() => { 13 assert_true(HTMLScriptElement.supports("webbundle")); 14 }); 15 const loaded_scripts = []; 16 function scriptLoaded(file) { 17 loaded_scripts.push(file); 18 } 19 const failed_scripts = []; 20 function scriptFailed(file) { 21 failed_scripts.push(file); 22 } 23 </script> 24 <script type="webbundle"> 25 { 26 "source": "//{{domains[www1]}}:{{ports[https][0]}}/web-bundle/resources/wbn/relative-url.wbn", 27 "resources": [ 28 "//{{domains[www1]}}:{{ports[https][0]}}/web-bundle/resources/wbn/relative-url-file.js", 29 "//{{domains[www1]}}:{{ports[https][0]}}/web-bundle/resources/wbn/relative-url/start-with-double-slash-cors.js", 30 "//{{domains[www1]}}:{{ports[https][0]}}/web-bundle/resources/wbn/relative-url/start-with-slash.js", 31 "//{{domains[www1]}}:{{ports[https][0]}}/web-bundle/resources/wbn/relative-url/subdirectory-path.js", 32 "//{{domains[www1]}}:{{ports[https][0]}}/web-bundle/resources/wbn/starts-with-two-dots.js", 33 "//{{domains[www1]}}:{{ports[https][0]}}/web-bundle/resources/starts-with-two-dots-out-of-scope.js" 34 ] 35 } 36 </script> 37 <script src="//{{domains[www1]}}:{{ports[https][0]}}/web-bundle/resources/wbn/relative-url-file.js"></script> 38 <script src="//{{domains[www1]}}:{{ports[https][0]}}/web-bundle/resources/wbn/relative-url/start-with-double-slash-cors.js"></script> 39 <script src="//{{domains[www1]}}:{{ports[https][0]}}/web-bundle/resources/wbn/relative-url/start-with-slash.js"></script> 40 <script src="//{{domains[www1]}}:{{ports[https][0]}}/web-bundle/resources/wbn/relative-url/subdirectory-path.js"></script> 41 <script src="//{{domains[www1]}}:{{ports[https][0]}}/web-bundle/resources/wbn/starts-with-two-dots.js"></script> 42 <script 43 src="//{{domains[www1]}}:{{ports[https][0]}}/web-bundle/resources/starts-with-two-dots-out-of-scope.js" 44 onerror="scriptFailed('starts-with-two-dots-out-of-scope.js')" 45 ></script> 46 <script> 47 promise_test(async (t) => { 48 assert_array_equals(loaded_scripts, [ 49 "relative-url-file.js", 50 "start-with-double-slash-cors.js", 51 "start-with-slash.js", 52 "subdirectory-path.js", 53 "starts-with-two-dots.js", 54 ]); 55 assert_array_equals(failed_scripts, [ 56 "starts-with-two-dots-out-of-scope.js", 57 ]); 58 }, "Relative Url in web bundle."); 59 </script> 60 </body>