| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <script src="/resources/testharness.js"></script> | 2 <script src="/resources/testharness.js"></script> |
| 3 <script src="/resources/testharnessreport.js"></script> | 3 <script src="/resources/testharnessreport.js"></script> |
| 4 <script src="resources/get-host-info.sub.js"></script> | 4 <script src="/common/get-host-info.sub.js"></script> |
| 5 <script src="resources/test-helpers.sub.js"></script> | 5 <script src="resources/test-helpers.sub.js"></script> |
| 6 <script src="resources/foreign-fetch-helpers.js"></script> | 6 <script src="resources/foreign-fetch-helpers.js"></script> |
| 7 <body> | 7 <body> |
| 8 <script> | 8 <script> |
| 9 var host_info = get_host_info(); | 9 var host_info = get_host_info(); |
| 10 var ff_worker = 'foreign-fetch-worker.js?{}'; | 10 var ff_worker = 'foreign-fetch-worker.js?{}'; |
| 11 var resource_path = new URL('resources/', location).pathname; | 11 var resource_path = new URL('resources/', location).pathname; |
| 12 | 12 |
| 13 promise_test(t => { | 13 promise_test(t => { |
| 14 var ff_scope = 'simple.txt?basic_sw'; | 14 var ff_scope = 'simple.txt?basic_sw'; |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 .then(() => fetch_from_different_origin( | 79 .then(() => fetch_from_different_origin( |
| 80 host_info.HTTPS_REMOTE_ORIGIN, remote_url, 'shared')) | 80 host_info.HTTPS_REMOTE_ORIGIN, remote_url, 'shared')) |
| 81 .then(response => assert_equals(response, 'Success: Foreign Fetch')) | 81 .then(response => assert_equals(response, 'Success: Foreign Fetch')) |
| 82 .then(() => fetch_from_different_origin( | 82 .then(() => fetch_from_different_origin( |
| 83 host_info.UNAUTHENTICATED_ORIGIN, remote_url, 'shared')) | 83 host_info.UNAUTHENTICATED_ORIGIN, remote_url, 'shared')) |
| 84 .then(response => assert_equals(response, | 84 .then(response => assert_equals(response, |
| 85 'Error: TypeError: Failed to fetch')); | 85 'Error: TypeError: Failed to fetch')); |
| 86 }, 'Fetches from an insecure shared worker aren\'t intercepted.'); | 86 }, 'Fetches from an insecure shared worker aren\'t intercepted.'); |
| 87 </script> | 87 </script> |
| 88 </body> | 88 </body> |
| OLD | NEW |