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

Unified Diff: chrome/browser/sessions/tab_restore_service_browsertest.cc

Issue 6660028: Decouple TabRestoreService from Browser (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fix mac build and handle NULL in delegate statics 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: chrome/browser/sessions/tab_restore_service_browsertest.cc
diff --git a/chrome/browser/sessions/tab_restore_service_browsertest.cc b/chrome/browser/sessions/tab_restore_service_browsertest.cc
index 623a363f0e82b45df4c8f2cdda8e3391e4f738a5..f810641bda94dcbfbd67a7a37125a9d35e706ef2 100644
--- a/chrome/browser/sessions/tab_restore_service_browsertest.cc
+++ b/chrome/browser/sessions/tab_restore_service_browsertest.cc
@@ -123,7 +123,7 @@ TEST_F(TabRestoreServiceTest, Basic) {
AddThreeNavigations();
// Have the service record the tab.
- service_->CreateHistoricalTab(&controller());
+ service_->CreateHistoricalTab(&controller(), -1);
// Make sure an entry was created.
ASSERT_EQ(1U, service_->entries().size());
@@ -145,7 +145,7 @@ TEST_F(TabRestoreServiceTest, Basic) {
NavigateToIndex(1);
// And check again.
- service_->CreateHistoricalTab(&controller());
+ service_->CreateHistoricalTab(&controller(), -1);
// There should be two entries now.
ASSERT_EQ(2U, service_->entries().size());
@@ -167,7 +167,7 @@ TEST_F(TabRestoreServiceTest, Basic) {
// Make sure TabRestoreService doesn't create an entry for a tab with no
// navigations.
TEST_F(TabRestoreServiceTest, DontCreateEmptyTab) {
- service_->CreateHistoricalTab(&controller());
+ service_->CreateHistoricalTab(&controller(), -1);
EXPECT_TRUE(service_->entries().empty());
}
@@ -176,7 +176,7 @@ TEST_F(TabRestoreServiceTest, Restore) {
AddThreeNavigations();
// Have the service record the tab.
- service_->CreateHistoricalTab(&controller());
+ service_->CreateHistoricalTab(&controller(), -1);
// Recreate the service and have it load the tabs.
RecreateService();
@@ -203,7 +203,7 @@ TEST_F(TabRestoreServiceTest, RestorePinnedAndApp) {
AddThreeNavigations();
// Have the service record the tab.
- service_->CreateHistoricalTab(&controller());
+ service_->CreateHistoricalTab(&controller(), -1);
// One entry should be created.
ASSERT_EQ(1U, service_->entries().size());
@@ -244,7 +244,7 @@ TEST_F(TabRestoreServiceTest, DontPersistPostData) {
controller().GetEntryAtIndex(2)->set_has_post_data(true);
// Have the service record the tab.
- service_->CreateHistoricalTab(&controller());
+ service_->CreateHistoricalTab(&controller(), -1);
ASSERT_EQ(1U, service_->entries().size());
// Recreate the service and have it load the tabs.
@@ -271,7 +271,7 @@ TEST_F(TabRestoreServiceTest, DontLoadTwice) {
AddThreeNavigations();
// Have the service record the tab.
- service_->CreateHistoricalTab(&controller());
+ service_->CreateHistoricalTab(&controller(), -1);
ASSERT_EQ(1U, service_->entries().size());
// Recreate the service and have it load the tabs.
@@ -340,7 +340,7 @@ TEST_F(TabRestoreServiceTest, LoadPreviousSessionAndTabs) {
AddThreeNavigations();
- service_->CreateHistoricalTab(&controller());
+ service_->CreateHistoricalTab(&controller(), -1);
RecreateService();
@@ -382,7 +382,7 @@ TEST_F(TabRestoreServiceTest, LoadPreviousSessionAndTabsPinned) {
AddThreeNavigations();
- service_->CreateHistoricalTab(&controller());
+ service_->CreateHistoricalTab(&controller(), -1);
RecreateService();
@@ -425,7 +425,7 @@ TEST_F(TabRestoreServiceTest, ManyWindowsInSessionService) {
AddThreeNavigations();
- service_->CreateHistoricalTab(&controller());
+ service_->CreateHistoricalTab(&controller(), -1);
RecreateService();
@@ -454,7 +454,7 @@ TEST_F(TabRestoreServiceTest, TimestampSurvivesRestore) {
AddThreeNavigations();
// Have the service record the tab.
- service_->CreateHistoricalTab(&controller());
+ service_->CreateHistoricalTab(&controller(), -1);
// Make sure an entry was created.
ASSERT_EQ(1U, service_->entries().size());
« no previous file with comments | « chrome/browser/sessions/tab_restore_service.cc ('k') | chrome/browser/sessions/tab_restore_service_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698