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

Unified Diff: Source/WebKit/chromium/tests/WebFrameTest.cpp

Issue 17391004: Reland "Fix reload after back/forward navigation setting the wrong cache policy."" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: With fix Created 7 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
« no previous file with comments | « no previous file | Source/core/loader/FrameLoader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebKit/chromium/tests/WebFrameTest.cpp
diff --git a/Source/WebKit/chromium/tests/WebFrameTest.cpp b/Source/WebKit/chromium/tests/WebFrameTest.cpp
index 28a1b0c42a03d9662e6aa39a599089e8b561f2dc..3d549c9754a02b3c694a2ddba77ef1d5ae067ec1 100644
--- a/Source/WebKit/chromium/tests/WebFrameTest.cpp
+++ b/Source/WebKit/chromium/tests/WebFrameTest.cpp
@@ -3382,5 +3382,31 @@ TEST_F(WebFrameTest, SimulateFragmentAnchorMiddleClick)
m_webView = 0;
}
+TEST_F(WebFrameTest, BackToReload)
+{
+ registerMockedHttpURLLoad("fragment_middle_click.html");
+ m_webView = FrameTestHelpers::createWebViewAndLoad(m_baseURL + "fragment_middle_click.html", true);
+ WebFrame* frame = m_webView->mainFrame();
+ WebHistoryItem firstItem = frame->currentHistoryItem();
+ EXPECT_FALSE(firstItem.isNull());
+
+ registerMockedHttpURLLoad("white-1x1.png");
+ FrameTestHelpers::loadFrame(frame, m_baseURL + "white-1x1.png");
+ Platform::current()->unitTestSupport()->serveAsynchronousMockedRequests();
+ EXPECT_FALSE(frame->previousHistoryItem().isNull());
+ EXPECT_EQ(firstItem.urlString(), frame->previousHistoryItem().urlString());
+
+ frame->loadHistoryItem(frame->previousHistoryItem());
+ Platform::current()->unitTestSupport()->serveAsynchronousMockedRequests();
+ EXPECT_EQ(firstItem.urlString(), frame->currentHistoryItem().urlString());
+
+ frame->reload();
+ Platform::current()->unitTestSupport()->serveAsynchronousMockedRequests();
+ EXPECT_EQ(WebURLRequest::ReloadIgnoringCacheData, frame->dataSource()->request().cachePolicy());
+
+ m_webView->close();
+ m_webView = 0;
+}
+
} // namespace
« no previous file with comments | « no previous file | Source/core/loader/FrameLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698