| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <title>Service Worker: Foreign Fetch CORS functionality</title> | 2 <title>Service Worker: Foreign Fetch CORS functionality</title> |
| 3 <script src="/resources/testharness.js"></script> | 3 <script src="/resources/testharness.js"></script> |
| 4 <script src="/resources/testharnessreport.js"></script> | 4 <script src="/resources/testharnessreport.js"></script> |
| 5 <script src="resources/get-host-info.sub.js"></script> | 5 <script src="/common/get-host-info.sub.js"></script> |
| 6 <script src="resources/test-helpers.sub.js"></script> | 6 <script src="resources/test-helpers.sub.js"></script> |
| 7 <script src="resources/foreign-fetch-helpers.js"></script> | 7 <script src="resources/foreign-fetch-helpers.js"></script> |
| 8 <body> | 8 <body> |
| 9 <script> | 9 <script> |
| 10 var host_info = get_host_info(); | 10 var host_info = get_host_info(); |
| 11 var origin = new URL(self.location).origin; | 11 var origin = new URL(self.location).origin; |
| 12 var wrong_origin = 'https://example.com/'; | 12 var wrong_origin = 'https://example.com/'; |
| 13 var test_header = 'X-ServiceWorker-ServerHeader'; | 13 var test_header = 'X-ServiceWorker-ServerHeader'; |
| 14 | 14 |
| 15 function url_to_fetch(scope) { | 15 function url_to_fetch(scope) { |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 for (var i = 0; i < tests.length; ++i) (data => { | 297 for (var i = 0; i < tests.length; ++i) (data => { |
| 298 promise_test(t => { | 298 promise_test(t => { |
| 299 var scope = scope_for_params(data.params); | 299 var scope = scope_for_params(data.params); |
| 300 var worker = worker_for_response(data.response); | 300 var worker = worker_for_response(data.response); |
| 301 return install_cross_origin_worker(t, worker, scope) | 301 return install_cross_origin_worker(t, worker, scope) |
| 302 .then(() => data.expectation(url_to_fetch(scope), t)); | 302 .then(() => data.expectation(url_to_fetch(scope), t)); |
| 303 }, data.description); | 303 }, data.description); |
| 304 })(tests[i]); | 304 })(tests[i]); |
| 305 </script> | 305 </script> |
| 306 </body> | 306 </body> |
| OLD | NEW |