| 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 preflight fetch (non-simple methods). | 6 // Tests for CORS preflight fetch (non-simple methods). |
| 7 // Spec: https://fetch.spec.whatwg.org/#cors-preflight-fetch | 7 // Spec: https://fetch.spec.whatwg.org/#cors-preflight-fetch |
| 8 | 8 |
| 9 var TEST_TARGETS = []; | 9 var TEST_TARGETS = []; |
| 10 | 10 |
| 11 ['PUT', 'XXX'].forEach(function(method) { | 11 ['PUT', 'XXX'].forEach(function(method) { |
| 12 var checkMethod = checkJsonpMethod.bind(this, method); | 12 var checkMethod = checkJsonpMethod.bind(this, method); |
| 13 TEST_TARGETS.push( | 13 TEST_TARGETS.push( |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 '&PACAHeaders=x-servicEworker-u, x-servicEworker-ua, x-servicewOrker-test
, x-sErviceworker-s, x-sErviceworker-v&PACRMethod=' + method + | 165 '&PACAHeaders=x-servicEworker-u, x-servicEworker-ua, x-servicewOrker-test
, x-sErviceworker-s, x-sErviceworker-v&PACRMethod=' + method + |
| 166 '&PACRHeaders=x-serviceworker-s, x-serviceworker-test, x-serviceworker-u,
x-serviceworker-ua, x-serviceworker-v&PreflightTest=200', | 166 '&PACRHeaders=x-serviceworker-s, x-serviceworker-test, x-serviceworker-u,
x-serviceworker-ua, x-serviceworker-v&PreflightTest=200', |
| 167 [fetchResolved, noContentLength, noServerHeader, hasBody, typeCors], | 167 [fetchResolved, noContentLength, noServerHeader, hasBody, typeCors], |
| 168 [checkMethod, hasCustomHeader2]]); | 168 [checkMethod, hasCustomHeader2]]); |
| 169 }); | 169 }); |
| 170 | 170 |
| 171 if (self.importScripts) { | 171 if (self.importScripts) { |
| 172 executeTests(TEST_TARGETS); | 172 executeTests(TEST_TARGETS); |
| 173 done(); | 173 done(); |
| 174 } | 174 } |
| OLD | NEW |