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

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

Issue 341043: Changes session restore to use a normal load rather than preferring... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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: chrome/browser/tab_contents/navigation_controller_unittest.cc
===================================================================
--- chrome/browser/tab_contents/navigation_controller_unittest.cc (revision 30525)
+++ chrome/browser/tab_contents/navigation_controller_unittest.cc (working copy)
@@ -1146,7 +1146,7 @@
PageTransition::LINK));
TabContents our_contents(profile(), NULL, MSG_ROUTING_NONE, NULL);
NavigationController& our_controller = our_contents.controller();
- our_controller.RestoreFromState(navigations, 0);
+ our_controller.RestoreFromState(navigations, 0, true);
our_controller.GoToIndex(0);
// We should now have one entry, and it should be "pending".
@@ -1154,6 +1154,8 @@
EXPECT_EQ(our_controller.GetEntryAtIndex(0),
our_controller.pending_entry());
EXPECT_EQ(0, our_controller.GetEntryAtIndex(0)->page_id());
+ EXPECT_EQ(NavigationEntry::RESTORE_LAST_SESSION,
+ our_controller.GetEntryAtIndex(0)->restore_type());
// Say we navigated to that entry.
ViewHostMsg_FrameNavigate_Params params = {0};
@@ -1174,6 +1176,8 @@
EXPECT_FALSE(our_controller.pending_entry());
EXPECT_EQ(url,
our_controller.GetLastCommittedEntry()->site_instance()->site());
+ EXPECT_EQ(NavigationEntry::RESTORE_NONE,
+ our_controller.GetEntryAtIndex(0)->restore_type());
}
// Make sure that the page type and stuff is correct after an interstitial.
« no previous file with comments | « chrome/browser/tab_contents/navigation_controller.cc ('k') | chrome/browser/tab_contents/navigation_entry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698