OLD | NEW |
1 if (self.importScripts) { | 1 if (self.importScripts) { |
2 importScripts('../resources/fetch-test-helpers.js'); | 2 importScripts('/fetch/resources/fetch-test-helpers.js'); |
3 importScripts('../resources/fetch-access-control-util.js'); | 3 importScripts('/fetch/resources/thorough-util.js'); |
4 } | 4 } |
5 | 5 |
6 // Tests for CORS check and CORS filtered response. | 6 // Tests for CORS check and CORS filtered response. |
7 | 7 |
8 var TEST_TARGETS = [ | 8 var TEST_TARGETS = [ |
9 // CORS test | 9 // CORS test |
10 | 10 |
11 [OTHER_BASE_URL + 'mode=same-origin&method=GET', [fetchRejected]], | 11 [OTHER_BASE_URL + 'mode=same-origin&method=GET', [fetchRejected]], |
12 [OTHER_BASE_URL + 'mode=same-origin&method=POST', [fetchRejected]], | 12 [OTHER_BASE_URL + 'mode=same-origin&method=POST', [fetchRejected]], |
13 [OTHER_BASE_URL + 'mode=same-origin&method=PUT', [fetchRejected]], | 13 [OTHER_BASE_URL + 'mode=same-origin&method=PUT', [fetchRejected]], |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 [OTHER_BASE_URL + 'mode=cors&method=POST&ACAOrigin=' + BASE_ORIGIN + | 85 [OTHER_BASE_URL + 'mode=cors&method=POST&ACAOrigin=' + BASE_ORIGIN + |
86 '&ACEHeaders=Content-Length, X-ServiceWorker-ServerHeader', | 86 '&ACEHeaders=Content-Length, X-ServiceWorker-ServerHeader', |
87 [fetchResolved, hasContentLength, hasServerHeader, hasBody, typeCors], | 87 [fetchResolved, hasContentLength, hasServerHeader, hasBody, typeCors], |
88 [methodIsPOST]], | 88 [methodIsPOST]], |
89 ]; | 89 ]; |
90 | 90 |
91 if (self.importScripts) { | 91 if (self.importScripts) { |
92 executeTests(TEST_TARGETS); | 92 executeTests(TEST_TARGETS); |
93 done(); | 93 done(); |
94 } | 94 } |
OLD | NEW |