| 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 (simple methods). | 6 // Tests for CORS preflight fetch (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 ['GET', 'POST'].forEach(function(method) { | 11 ['GET', 'POST'].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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 '&headers=CUSTOM2&ACAOrigin=*&PACAOrigin=*&PACAHeaders=x-servicEworker-u,
x-servicEworker-ua, x-servicewOrker-test, x-sErviceworker-s, x-sErviceworker-v&
PACRMethod=' + method + | 102 '&headers=CUSTOM2&ACAOrigin=*&PACAOrigin=*&PACAHeaders=x-servicEworker-u,
x-servicEworker-ua, x-servicewOrker-test, x-sErviceworker-s, x-sErviceworker-v&
PACRMethod=' + method + |
| 103 '&PACRHeaders=x-serviceworker-s, x-serviceworker-test, x-serviceworker-u,
x-serviceworker-ua, x-serviceworker-v&PreflightTest=200', | 103 '&PACRHeaders=x-serviceworker-s, x-serviceworker-test, x-serviceworker-u,
x-serviceworker-ua, x-serviceworker-v&PreflightTest=200', |
| 104 [fetchResolved, noContentLength, noServerHeader, hasBody, typeCors], | 104 [fetchResolved, noContentLength, noServerHeader, hasBody, typeCors], |
| 105 [checkMethod, hasCustomHeader2]]); | 105 [checkMethod, hasCustomHeader2]]); |
| 106 }); | 106 }); |
| 107 | 107 |
| 108 if (self.importScripts) { | 108 if (self.importScripts) { |
| 109 executeTests(TEST_TARGETS); | 109 executeTests(TEST_TARGETS); |
| 110 done(); | 110 done(); |
| 111 } | 111 } |
| OLD | NEW |