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

Unified Diff: third_party/WebKit/Source/web/AssociatedURLLoaderTest.cpp

Issue 1976513002: Set the request mode and the credentials mode even if the request will not go to ServiceWorker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: introduce IsNoCORSAllowedContext Created 4 years, 7 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/Source/web/AssociatedURLLoaderTest.cpp
diff --git a/third_party/WebKit/Source/web/AssociatedURLLoaderTest.cpp b/third_party/WebKit/Source/web/AssociatedURLLoaderTest.cpp
index 1bbdd6d2a832e63c3a072b6530f017a3d0d2bf93..ff6deb367d11f592ff1a15cfc65861d15bf93e5f 100644
--- a/third_party/WebKit/Source/web/AssociatedURLLoaderTest.cpp
+++ b/third_party/WebKit/Source/web/AssociatedURLLoaderTest.cpp
@@ -321,10 +321,13 @@ TEST_F(AssociatedURLLoaderTest, SameOriginRestriction)
TEST_F(AssociatedURLLoaderTest, CrossOriginSuccess)
{
// This is cross-origin since the frame was loaded from www.test.com.
- KURL url = toKURL("http://www.other.com/CrossOriginSuccess.html");
+ KURL url = toKURL("http://www.other.com/CrossOriginSuccess");
WebURLRequest request;
request.initialize();
request.setURL(url);
+ // No-CORS requests (CrossOriginRequestPolicyAllow) aren't allowed for the
+ // default context. So we set the context as Script here.
+ request.setRequestContext(WebURLRequest::RequestContextScript);
m_expectedResponse = WebURLResponse();
m_expectedResponse.initialize();
« no previous file with comments | « third_party/WebKit/Source/core/loader/ThreadableLoaderTest.cpp ('k') | third_party/WebKit/Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698