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

Unified Diff: third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp

Issue 2768293002: FrameFetchContext should respect BypassingCache (Closed)
Patch Set: rebase Created 3 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 | « third_party/WebKit/Source/core/loader/FrameFetchContext.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/core/loader/FrameFetchContextTest.cpp
diff --git a/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp b/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp
index c1e6655872a2a4699aef948d014c76c3cb0d5b69..aba0a5e290a744cec11dd34bb3c0c57ba47c099a 100644
--- a/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp
@@ -556,7 +556,7 @@ TEST_F(FrameFetchContextTest, MainResource) {
// Post
ResourceRequest postRequest("http://www.example.com");
- postRequest.setHTTPMethod("POST");
+ postRequest.setHTTPMethod(HTTPNames::POST);
EXPECT_EQ(WebCachePolicy::ValidatingCacheData,
fetchContext->resourceRequestCachePolicy(
postRequest, Resource::MainResource, FetchRequest::NoDefer));
@@ -581,6 +581,24 @@ TEST_F(FrameFetchContextTest, MainResource) {
fetchContext->resourceRequestCachePolicy(
conditional, Resource::MainResource, FetchRequest::NoDefer));
+ // FrameLoadTypeReloadBypassingCache
+ document->loader()->setLoadType(FrameLoadTypeReloadBypassingCache);
+ EXPECT_EQ(WebCachePolicy::BypassingCache,
+ fetchContext->resourceRequestCachePolicy(
+ request, Resource::MainResource, FetchRequest::NoDefer));
+
+ // FrameLoadTypeReloadBypassingCache with a conditional request
+ document->loader()->setLoadType(FrameLoadTypeReloadBypassingCache);
+ EXPECT_EQ(WebCachePolicy::BypassingCache,
+ fetchContext->resourceRequestCachePolicy(
+ conditional, Resource::MainResource, FetchRequest::NoDefer));
+
+ // FrameLoadTypeReloadBypassingCache with a post request
+ document->loader()->setLoadType(FrameLoadTypeReloadBypassingCache);
+ EXPECT_EQ(WebCachePolicy::BypassingCache,
+ fetchContext->resourceRequestCachePolicy(
+ postRequest, Resource::MainResource, FetchRequest::NoDefer));
+
// Set up a child frame
FrameFetchContext* childFetchContext = createChildFrame();
« no previous file with comments | « third_party/WebKit/Source/core/loader/FrameFetchContext.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698