Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Unified Diff: third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/thorough/cors.js

Issue 1762893002: Reland of Set the request mode and the credentials mode of FetchEvent in the service worker correct… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: incorporated tyoshino's comment Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/thorough/cors-preflight.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/thorough/cors.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/thorough/cors.js b/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/thorough/cors.js
index 409cf6a7d0f8915ccc976c3d3b36ba4074585cba..93b153c366c9b27085ca38bb2ce002ed78710d8a 100644
--- a/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/thorough/cors.js
+++ b/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/thorough/cors.js
@@ -18,34 +18,40 @@ var TEST_TARGETS = [
// CORS check
// https://fetch.spec.whatwg.org/#concept-cors-check
// Tests for Access-Control-Allow-Origin header.
- [OTHER_BASE_URL + 'mode=cors&method=GET',
+ [OTHER_BASE_URL + 'mode=cors&credentials=same-origin&method=GET',
[fetchRejected]],
- [OTHER_BASE_URL + 'mode=cors&method=GET&ACAOrigin=*',
+ [OTHER_BASE_URL + 'mode=cors&credentials=same-origin&method=GET&ACAOrigin=*',
[fetchResolved, noContentLength, noServerHeader, hasBody, typeCors],
[methodIsGET, authCheckNone]],
- [OTHER_BASE_URL + 'mode=cors&method=GET&ACAOrigin=' + BASE_ORIGIN,
+ [OTHER_BASE_URL + 'mode=cors&credentials=same-origin&method=GET' +
+ '&ACAOrigin=' + BASE_ORIGIN,
[fetchResolved, noContentLength, noServerHeader, hasBody, typeCors],
[methodIsGET]],
- [OTHER_BASE_URL + 'mode=cors&method=GET&ACAOrigin=' + BASE_ORIGIN +
- ',http://www.example.com',
+ [OTHER_BASE_URL + 'mode=cors&credentials=same-origin&method=GET&' +
+ 'ACAOrigin=' + BASE_ORIGIN + ',http://www.example.com',
[fetchRejected]],
- [OTHER_BASE_URL + 'mode=cors&method=GET&ACAOrigin=http://www.example.com',
+ [OTHER_BASE_URL + 'mode=cors&credentials=same-origin&method=GET' +
+ '&ACAOrigin=http://www.example.com',
[fetchRejected]],
// CORS filtered response
// https://fetch.spec.whatwg.org/#concept-filtered-response-cors
// Tests for Access-Control-Expose-Headers header.
- [OTHER_BASE_URL + 'mode=cors&method=GET&ACAOrigin=*&ACEHeaders=X-ServiceWorker-ServerHeader',
+ [OTHER_BASE_URL + 'mode=cors&credentials=same-origin&method=GET&ACAOrigin=*' +
+ '&ACEHeaders=X-ServiceWorker-ServerHeader',
[fetchResolved, noContentLength, hasServerHeader, hasBody, typeCors],
[methodIsGET]],
- [OTHER_BASE_URL + 'mode=cors&method=GET&ACAOrigin=' + BASE_ORIGIN +
+ [OTHER_BASE_URL + 'mode=cors&credentials=same-origin&method=GET' +
+ '&ACAOrigin=' + BASE_ORIGIN +
'&ACEHeaders=X-ServiceWorker-ServerHeader',
[fetchResolved, noContentLength, hasServerHeader, hasBody, typeCors],
[methodIsGET]],
- [OTHER_BASE_URL + 'mode=cors&method=GET&ACAOrigin=*&ACEHeaders=Content-Length, X-ServiceWorker-ServerHeader',
+ [OTHER_BASE_URL + 'mode=cors&credentials=same-origin&method=GET' +
+ '&ACAOrigin=*&ACEHeaders=Content-Length, X-ServiceWorker-ServerHeader',
[fetchResolved, hasContentLength, hasServerHeader, hasBody, typeCors],
[methodIsGET]],
- [OTHER_BASE_URL + 'mode=cors&method=GET&ACAOrigin=' + BASE_ORIGIN +
+ [OTHER_BASE_URL + 'mode=cors&credentials=same-origin&method=GET' +
+ '&ACAOrigin=' + BASE_ORIGIN +
'&ACEHeaders=Content-Length, X-ServiceWorker-ServerHeader',
[fetchResolved, hasContentLength, hasServerHeader, hasBody, typeCors],
[methodIsGET]],
@@ -55,34 +61,40 @@ var TEST_TARGETS = [
// CORS check
// https://fetch.spec.whatwg.org/#concept-cors-check
// Tests for Access-Control-Allow-Origin header.
- [OTHER_BASE_URL + 'mode=cors&method=POST',
+ [OTHER_BASE_URL + 'mode=cors&credentials=same-origin&method=POST',
[fetchRejected]],
- [OTHER_BASE_URL + 'mode=cors&method=POST&ACAOrigin=*',
+ [OTHER_BASE_URL + 'mode=cors&credentials=same-origin&method=POST&ACAOrigin=*',
[fetchResolved, noContentLength, noServerHeader, hasBody, typeCors],
[methodIsPOST]],
- [OTHER_BASE_URL + 'mode=cors&method=POST&ACAOrigin=' + BASE_ORIGIN,
+ [OTHER_BASE_URL + 'mode=cors&credentials=same-origin&method=POST' +
+ '&ACAOrigin=' + BASE_ORIGIN,
[fetchResolved, noContentLength, noServerHeader, hasBody, typeCors],
[methodIsPOST]],
- [OTHER_BASE_URL + 'mode=cors&method=POST&ACAOrigin=' + BASE_ORIGIN +
+ [OTHER_BASE_URL + 'mode=cors&credentials=same-origin&method=POST' +
+ '&ACAOrigin=' + BASE_ORIGIN +
',http://www.example.com',
[fetchRejected]],
- [OTHER_BASE_URL + 'mode=cors&method=POST&ACAOrigin=http://www.example.com',
+ [OTHER_BASE_URL + 'mode=cors&credentials=same-origin&method=POST' +
+ '&ACAOrigin=http://www.example.com',
[fetchRejected]],
// CORS filtered response
// https://fetch.spec.whatwg.org/#concept-filtered-response-cors
// Tests for Access-Control-Expose-Headers header.
- [OTHER_BASE_URL + 'mode=cors&method=POST&ACAOrigin=*&ACEHeaders=X-ServiceWorker-ServerHeader',
+ [OTHER_BASE_URL + 'mode=cors&credentials=same-origin&method=POST' +
+ '&ACAOrigin=*&ACEHeaders=X-ServiceWorker-ServerHeader',
[fetchResolved, noContentLength, hasServerHeader, hasBody, typeCors],
[methodIsPOST]],
- [OTHER_BASE_URL + 'mode=cors&method=POST&ACAOrigin=' + BASE_ORIGIN +
- '&ACEHeaders=X-ServiceWorker-ServerHeader',
+ [OTHER_BASE_URL + 'mode=cors&credentials=same-origin&method=POST' +
+ '&ACAOrigin=' + BASE_ORIGIN + '&ACEHeaders=X-ServiceWorker-ServerHeader',
[fetchResolved, noContentLength, hasServerHeader, hasBody, typeCors],
[methodIsPOST]],
- [OTHER_BASE_URL + 'mode=cors&method=POST&ACAOrigin=*&ACEHeaders=Content-Length, X-ServiceWorker-ServerHeader',
+ [OTHER_BASE_URL + 'mode=cors&credentials=same-origin&method=POST' +
+ '&ACAOrigin=*&ACEHeaders=Content-Length, X-ServiceWorker-ServerHeader',
[fetchResolved, hasContentLength, hasServerHeader, hasBody, typeCors],
[methodIsPOST]],
- [OTHER_BASE_URL + 'mode=cors&method=POST&ACAOrigin=' + BASE_ORIGIN +
+ [OTHER_BASE_URL + 'mode=cors&credentials=same-origin&method=POST' +
+ '&ACAOrigin=' + BASE_ORIGIN +
'&ACEHeaders=Content-Length, X-ServiceWorker-ServerHeader',
[fetchResolved, hasContentLength, hasServerHeader, hasBody, typeCors],
[methodIsPOST]],
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/thorough/cors-preflight.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698