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

Unified Diff: third_party/WebKit/Source/web/tests/WebFrameTest.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
« no previous file with comments | « third_party/WebKit/Source/web/AssociatedURLLoaderTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/tests/WebFrameTest.cpp
diff --git a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
index 7299c17c81981a4a03a1d4076a482fe5d40e93b7..ed3ada6ab9daec595de2171ade8c486bfb60feaf 100644
--- a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
+++ b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
@@ -7903,6 +7903,8 @@ TEST_P(ParameterizedWebFrameTest, LoaderOriginAccess)
// Cross-origin request.
KURL resourceUrl(ParsedURLString, "chrome://test.pdf");
+ ResourceRequest request(resourceUrl);
+ request.setRequestContext(WebURLRequest::RequestContextObject);
registerMockedChromeURLLoad("test.pdf");
LocalFrame* frame(toLocalFrame(webViewHelper.webViewImpl()->page()->mainFrame()));
@@ -7914,14 +7916,14 @@ TEST_P(ParameterizedWebFrameTest, LoaderOriginAccess)
options.crossOriginRequestPolicy = UseAccessControl;
ResourceLoaderOptions resourceLoaderOptions;
DocumentThreadableLoader::loadResourceSynchronously(
- *frame->document(), ResourceRequest(resourceUrl), client, options, resourceLoaderOptions);
+ *frame->document(), request, client, options, resourceLoaderOptions);
EXPECT_TRUE(client.failed());
client.reset();
// Try to load the request with cross origin access. Should succeed.
options.crossOriginRequestPolicy = AllowCrossOriginRequests;
DocumentThreadableLoader::loadResourceSynchronously(
- *frame->document(), ResourceRequest(resourceUrl), client, options, resourceLoaderOptions);
+ *frame->document(), request, client, options, resourceLoaderOptions);
EXPECT_FALSE(client.failed());
}
« no previous file with comments | « third_party/WebKit/Source/web/AssociatedURLLoaderTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698