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

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

Issue 2421093003: Allow redirects for requests that require preflight. (Closed)
Patch Set: Layout tests Created 4 years, 2 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
Index: third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/thorough/redirect.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/thorough/redirect.js b/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/thorough/redirect.js
index 7f33e95b817d440bddb5505df85ce0ef1982c2ce..52f0f4e74554e10737901e618def8cd0a1d4d3b6 100644
--- a/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/thorough/redirect.js
+++ b/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/thorough/redirect.js
@@ -190,20 +190,22 @@ var TEST_TARGETS = [
// [fetchResolved, noContentLength, noServerHeader, hasBody, typeCors],
// [methodIsPOST]],
- // Once CORS preflight flag is set, redirecting to the cross-origin is not
- // allowed.
+ // Requests that require preflight.
// Custom method
- [OTHER_REDIRECT_URL +
+ [OTHER_BASE_URL +
yhirano 2016/10/27 06:19:44 I'm a bit confused: As you are making redirect + C
Jack Bates 2016/11/03 17:22:03 My mistake. REDIRECT_URL was incorrectly redirecti
encodeURIComponent(BASE_URL + 'ACAOrigin=*&ACAMethods=PUT') +
'&mode=cors&credentials=same-origin&method=PUT&ACAOrigin=*&ACAMethods=PUT',
- [fetchRejected]],
+ [fetchResolved, noContentLength, noServerHeader, hasBody, typeCors],
+ [methodIsPUT]],
// Custom header
- [OTHER_REDIRECT_URL +
+ [OTHER_BASE_URL +
encodeURIComponent(
BASE_URL +
'ACAOrigin=' + BASE_ORIGIN + '&ACAHeaders=x-serviceworker-test') +
- '&mode=cors&credentials=same-origin&method=GET&headers=CUSTOM&ACAOrigin=*',
- [fetchRejected]],
+ '&mode=cors&credentials=same-origin&method=GET&headers=CUSTOM' +
+ '&ACAOrigin=*&ACAHeaders=x-serviceworker-test',
+ [fetchResolved, noContentLength, noServerHeader, hasBody, typeCors],
+ [methodIsGET, hasCustomHeader]],
// Redirect: other origin -> other origin
[OTHER_REDIRECT_URL + encodeURIComponent(OTHER_BASE_URL) +
@@ -272,21 +274,22 @@ var TEST_TARGETS = [
[fetchResolved, noContentLength, hasServerHeader, hasBody, typeCors],
[methodIsGET, authCheckNone]],
- // Once CORS preflight flag is set, redirecting to the cross-origin is not
- // allowed.
+ // Requests that require preflight.
// Custom method
- [OTHER_REDIRECT_URL +
+ [OTHER_BASE_URL +
encodeURIComponent(OTHER_BASE_URL + 'ACAOrigin=*&ACAMethods=PUT') +
'&mode=cors&credentials=same-origin&method=PUT&ACAOrigin=*&ACAMethods=PUT',
- [fetchRejected]],
+ [fetchResolved, noContentLength, noServerHeader, hasBody, typeCors],
+ [methodIsPUT]],
// Custom header
- [OTHER_REDIRECT_URL +
+ [OTHER_BASE_URL +
encodeURIComponent(
OTHER_BASE_URL +
'ACAOrigin=' + BASE_ORIGIN + '&ACAHeaders=x-serviceworker-test') +
'&mode=cors&credentials=same-origin&method=GET&headers=CUSTOM' +
'&ACAOrigin=' + BASE_ORIGIN + '&ACAHeaders=x-serviceworker-test',
- [fetchRejected]],
+ [fetchResolved, noContentLength, noServerHeader, hasBody, typeCors],
+ [methodIsGET, hasCustomHeader]],
];
if (self.importScripts) {

Powered by Google App Engine
This is Rietveld 408576698