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

Unified Diff: content/browser/tab_contents/navigation_controller_unittest.cc

Issue 6709056: Avoid corrupting the pending_entry when an unexpected navigation commits. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Clear pending entry Created 9 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/tab_contents/navigation_controller_unittest.cc
diff --git a/content/browser/tab_contents/navigation_controller_unittest.cc b/content/browser/tab_contents/navigation_controller_unittest.cc
index abbed7402a16de5aeb607ccf28883a39dcb98d82..3fa08a96be659e4c7b542867663d49397484d592 100644
--- a/content/browser/tab_contents/navigation_controller_unittest.cc
+++ b/content/browser/tab_contents/navigation_controller_unittest.cc
@@ -613,8 +613,8 @@ TEST_F(NavigationControllerTest, Back_OtherBackPending) {
// match the pending one.
rvh()->SendNavigate(0, kUrl1);
- // The navigation should not have affected the pending entry.
- EXPECT_EQ(1, controller().pending_entry_index());
+ // The committed navigation should clear the pending entry.
+ EXPECT_EQ(-1, controller().pending_entry_index());
// But the navigated entry should be the last committed.
EXPECT_EQ(0, controller().last_committed_entry_index());

Powered by Google App Engine
This is Rietveld 408576698