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

Unified Diff: content/browser/web_contents/navigation_controller_impl_unittest.cc

Issue 12637002: Set IsInitialNavigation to false after commit, not document load. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
Index: content/browser/web_contents/navigation_controller_impl_unittest.cc
diff --git a/content/browser/web_contents/navigation_controller_impl_unittest.cc b/content/browser/web_contents/navigation_controller_impl_unittest.cc
index 8ddf7da5569bf1fbb872f7831de9ee9cd67a9275..22b55a8c9b0ec3a97e9854f1bb2ce340c08272fe 100644
--- a/content/browser/web_contents/navigation_controller_impl_unittest.cc
+++ b/content/browser/web_contents/navigation_controller_impl_unittest.cc
@@ -1885,7 +1885,6 @@ TEST_F(NavigationControllerTest, ClientRedirectAfterInPageNavigation) {
{
const GURL url("http://foo2/");
test_rvh()->SendNavigate(1, url);
- controller.DocumentLoadedInFrame();
EXPECT_TRUE(notifications.Check1AndReset(NOTIFICATION_NAV_ENTRY_COMMITTED));
}
@@ -3054,16 +3053,16 @@ TEST_F(NavigationControllerTest, IsInitialNavigation) {
// Initial state.
EXPECT_TRUE(controller.IsInitialNavigation());
- // After load, it is false.
- controller.DocumentLoadedInFrame();
- EXPECT_FALSE(controller.IsInitialNavigation());
-
+ // After commit, it stays false.
const GURL url1("http://foo1");
test_rvh()->SendNavigate(0, url1);
EXPECT_TRUE(notifications.Check1AndReset(NOTIFICATION_NAV_ENTRY_COMMITTED));
-
- // After commit, it stays false.
EXPECT_FALSE(controller.IsInitialNavigation());
+
+ // After starting a new navigation, it stays false.
+ const GURL url2("http://foo2");
+ controller.LoadURL(
+ url2, Referrer(), PAGE_TRANSITION_TYPED, std::string());
}
// Check that the favicon is not reused across a client redirect.
« no previous file with comments | « content/browser/web_contents/navigation_controller_impl.cc ('k') | content/browser/web_contents/web_contents_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698