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

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

Issue 2633423003: Leave out empty-valued Access-Control-Request-Headers: on preflights. (Closed)
Patch Set: explicitly include safe headers in the (test) request Created 3 years, 11 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/cors-preflight2.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/thorough/cors-preflight2.js b/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/thorough/cors-preflight2.js
index 675cd6bb217e62f44187127d775b0c04293cf221..3fdafc3888228749800a00fc821a30a05f9bc78b 100644
--- a/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/thorough/cors-preflight2.js
+++ b/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/thorough/cors-preflight2.js
@@ -167,6 +167,15 @@ var TEST_TARGETS = [];
'&PACRHeaders=x-serviceworker-test&PreflightTest=200',
[fetchResolved, noContentLength, noServerHeader, hasBody, typeCors],
[checkMethod, hasCustomHeader]],
+
+ // Verify that Access-Control-Request-Headers: is not present in preflight
+ // if its value is the empty list - https://crbug.com/633729
+ [OTHER_BASE_URL + 'mode=cors&credentials=same-origin&method=' + method +
+ '&headers=SAFE&ACAOrigin=*&PACAOrigin=*&PACAMethods=' + method +
+ '&PACRHeaders=missing&PACRMethod=' + method + '&PreflightTest=200',
+ [fetchResolved, noContentLength, noServerHeader, hasBody, typeCors],
+ [checkMethod]],
+
// Test Access-Control-Request-Headers is sorted https://crbug.com/452391
[OTHER_BASE_URL + 'mode=cors&credentials=same-origin&method=' + method +
'&headers=CUSTOM2&ACAOrigin=*&PACAOrigin=*&PACAMethods=' + method +

Powered by Google App Engine
This is Rietveld 408576698