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

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

Issue 2555623003: WebFrameTest: use ReloadMainResource instead of Reload (Closed)
Patch Set: Created 4 years 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/tests/FrameTestHelpers.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 380943d4bd35d176f42aaf4746e2d270e45c48ab..992d3348d6c4734c2b2a39044397c990ad80fd52 100644
--- a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
+++ b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
@@ -4089,7 +4089,7 @@ TEST_P(ParameterizedWebFrameTest, ReloadDoesntSetRedirect) {
webViewHelper.webView()->mainFrame()->reload(
WebFrameLoadType::ReloadBypassingCache);
// start another reload before request is delivered.
- FrameTestHelpers::reloadFrameIgnoringCache(
+ FrameTestHelpers::reloadFrameBypassingCache(
webViewHelper.webView()->mainFrame());
}
@@ -4147,7 +4147,7 @@ TEST_F(WebFrameTest, ReloadWithOverrideURLPreservesState) {
EXPECT_EQ(0, webViewHelper.webView()->mainFrame()->getScrollOffset().height);
EXPECT_EQ(1.0f, webViewHelper.webView()->pageScaleFactor());
- // Reload the page while ignoring the cache. State should not be propagated.
+ // Reload the page while bypassing the cache. State should not be propagated.
webViewHelper.webView()->mainFrame()->reloadWithOverrideURL(
toKURL(m_baseURL + thirdURL), WebFrameLoadType::ReloadBypassingCache);
FrameTestHelpers::pumpPendingRequestsForFrameToLoad(
@@ -4167,7 +4167,7 @@ TEST_P(ParameterizedWebFrameTest, ReloadWhileProvisional) {
WebURLRequest request(toKURL(m_baseURL + "fixed_layout.html"));
webViewHelper.webView()->mainFrame()->loadRequest(request);
// start reload before first request is delivered.
- FrameTestHelpers::reloadFrameIgnoringCache(
+ FrameTestHelpers::reloadFrameBypassingCache(
webViewHelper.webView()->mainFrame());
WebDataSource* dataSource =
@@ -7088,7 +7088,12 @@ TEST_P(ParameterizedWebFrameTest, ReloadIframe) {
EXPECT_EQ(mainClient.childFrameCreationCount(), 2);
EXPECT_EQ(childClient.willSendRequestCallCount(), 2);
- EXPECT_EQ(childClient.getCachePolicy(), WebCachePolicy::ValidatingCacheData);
+
+ // Sub-frames should not be forcibly revalidated.
+ // TODO(toyoshim): Will consider to revalidate main resources in sub-frames
+ // on reloads. Or will do only for bypassingCache.
+ EXPECT_EQ(childClient.getCachePolicy(),
+ WebCachePolicy::UseProtocolCachePolicy);
}
class TestSameDocumentWebFrameClient
@@ -8250,13 +8255,13 @@ TEST_P(ParameterizedWebFrameTest, ManifestCSPFetchSelfReportOnly) {
}
TEST_P(ParameterizedWebFrameTest, ReloadBypassingCache) {
- // Check that a reload ignoring cache on a frame will result in the cache
+ // Check that a reload bypassing 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);
+ FrameTestHelpers::reloadFrameBypassingCache(frame);
EXPECT_EQ(WebCachePolicy::BypassingCache,
frame->dataSource()->request().getCachePolicy());
}
« no previous file with comments | « third_party/WebKit/Source/web/tests/FrameTestHelpers.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698