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

Unified Diff: Source/web/tests/WebFrameTest.cpp

Issue 318673002: Use the ReloadBypassingCache policy (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Addressed Przemek's comments Created 6 years, 6 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: Source/web/tests/WebFrameTest.cpp
diff --git a/Source/web/tests/WebFrameTest.cpp b/Source/web/tests/WebFrameTest.cpp
index 890bb5b1ca09794147879f80db02198e4e1c44e2..e9349511632181b2469f21e9312dd98dd92316c6 100644
--- a/Source/web/tests/WebFrameTest.cpp
+++ b/Source/web/tests/WebFrameTest.cpp
@@ -5449,4 +5449,16 @@ TEST_F(WebFrameTest, NotifyManifestChange)
EXPECT_EQ(14, webFrameClient.manifestChangeCount());
}
+TEST_F(WebFrameTest, ReloadIgnoringCache)
+{
+ // Check that a reload ignoring cache on a frame will result in the cache
+ // policy of the request being set to ReloadBypassingCache.
+ registerMockedHttpURLLoad("foo.html");
+ FrameTestHelpers::WebViewHelper webViewHelper;
+ webViewHelper.initializeAndLoad(m_baseURL + "foo.html", true);
+ WebFrame* frame = webViewHelper.webView()->mainFrame();
+ FrameTestHelpers::reloadFrameIgnoringCache(frame);
+ EXPECT_EQ(WebURLRequest::ReloadBypassingCache, frame->dataSource()->request().cachePolicy());
+}
+
} // namespace
« Source/core/loader/DocumentLoader.cpp ('K') | « Source/core/loader/FrameLoader.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698