diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-03 23:48:30 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-03 23:48:30 +0000 |
commit | 5e36967c2b96745b13f3bc8d9ca56f62d888ae1d (patch) | |
tree | b0d19f0215e69041641f667af37cd493b748c4e2 /chrome/browser/tab_contents/navigation_controller_unittest.cc | |
parent | 4eae2c4462379beaf4df96815a2cd95424dcd73e (diff) | |
download | chromium_src-5e36967c2b96745b13f3bc8d9ca56f62d888ae1d.zip chromium_src-5e36967c2b96745b13f3bc8d9ca56f62d888ae1d.tar.gz chromium_src-5e36967c2b96745b13f3bc8d9ca56f62d888ae1d.tar.bz2 |
Changes session restore to use a normal load rather than preferring
the cache. We need to do this else we don't honor page expiration and
end up showing stale data for some sites.
BUG=21195
TEST=make sure session restore works.
Review URL: http://codereview.chromium.org/341043
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30892 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents/navigation_controller_unittest.cc')
-rw-r--r-- | chrome/browser/tab_contents/navigation_controller_unittest.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/chrome/browser/tab_contents/navigation_controller_unittest.cc b/chrome/browser/tab_contents/navigation_controller_unittest.cc index fc31c75..142ad8b 100644 --- a/chrome/browser/tab_contents/navigation_controller_unittest.cc +++ b/chrome/browser/tab_contents/navigation_controller_unittest.cc @@ -1146,7 +1146,7 @@ TEST_F(NavigationControllerTest, RestoreNavigate) { 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 @@ TEST_F(NavigationControllerTest, RestoreNavigate) { 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 @@ TEST_F(NavigationControllerTest, RestoreNavigate) { 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. |