summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sessions
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-02 01:02:46 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-02 01:02:46 +0000
commit1be69aa0ed94b85870485aa090cf73e31b94dc79 (patch)
tree8a8006f2511af5f07e1764a086ab11de26adf5c7 /chrome/browser/sessions
parenta0ddf29301017291854f477c02c180bf349b9e1c (diff)
downloadchromium_src-1be69aa0ed94b85870485aa090cf73e31b94dc79.zip
chromium_src-1be69aa0ed94b85870485aa090cf73e31b94dc79.tar.gz
chromium_src-1be69aa0ed94b85870485aa090cf73e31b94dc79.tar.bz2
Revert "Don't create pending entries when a navigation is initiated by the page."
TBR=jcivelli Review URL: http://codereview.chromium.org/3360003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58289 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sessions')
-rw-r--r--chrome/browser/sessions/tab_restore_service_browsertest.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/chrome/browser/sessions/tab_restore_service_browsertest.cc b/chrome/browser/sessions/tab_restore_service_browsertest.cc
index 46f91e8..dcbd688 100644
--- a/chrome/browser/sessions/tab_restore_service_browsertest.cc
+++ b/chrome/browser/sessions/tab_restore_service_browsertest.cc
@@ -9,7 +9,6 @@
#include "chrome/browser/sessions/tab_restore_service.h"
#include "chrome/browser/tab_contents/navigation_controller.h"
#include "chrome/browser/tab_contents/navigation_entry.h"
-#include "chrome/browser/tab_contents/test_tab_contents.h"
#include "chrome/test/render_view_test.h"
#include "chrome/test/testing_profile.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -69,7 +68,8 @@ class TabRestoreServiceTest : public RenderViewHostTestHarness {
// Navigate back. We have to do this song and dance as NavigationController
// isn't happy if you navigate immediately while going back.
controller().GoToIndex(index);
- contents()->CommitPendingNavigation();
+ rvh()->SendNavigate(controller().pending_entry()->page_id(),
+ controller().pending_entry()->url());
}
void RecreateService() {
@@ -157,9 +157,9 @@ TEST_F(TabRestoreServiceTest, Basic) {
tab = static_cast<TabRestoreService::Tab*>(entry);
EXPECT_FALSE(tab->pinned);
ASSERT_EQ(3U, tab->navigations.size());
- EXPECT_EQ(url1_, tab->navigations[0].virtual_url());
- EXPECT_EQ(url2_, tab->navigations[1].virtual_url());
- EXPECT_EQ(url3_, tab->navigations[2].virtual_url());
+ EXPECT_TRUE(url1_ == tab->navigations[0].virtual_url());
+ EXPECT_TRUE(url2_ == tab->navigations[1].virtual_url());
+ EXPECT_TRUE(url3_ == tab->navigations[2].virtual_url());
EXPECT_EQ(1, tab->current_navigation_index);
EXPECT_EQ(time_factory_->TimeNow().ToInternalValue(),
tab->timestamp.ToInternalValue());