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

Side by Side Diff: chrome/browser/ui/toolbar/recent_tabs_sub_menu_model_unittest.cc

Issue 1350653004: [sessions] Properly namespace recently-componentized TabRestore code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Mac Created 5 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.h" 5 #include "chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 scoped_ptr<syncer::SyncErrorFactory>( 137 scoped_ptr<syncer::SyncErrorFactory>(
138 new syncer::SyncErrorFactoryMock)); 138 new syncer::SyncErrorFactoryMock));
139 } 139 }
140 140
141 void WaitForLoadFromLastSession() { 141 void WaitForLoadFromLastSession() {
142 content::RunAllBlockingPoolTasksUntilIdle(); 142 content::RunAllBlockingPoolTasksUntilIdle();
143 } 143 }
144 144
145 static scoped_ptr<KeyedService> GetTabRestoreService( 145 static scoped_ptr<KeyedService> GetTabRestoreService(
146 content::BrowserContext* browser_context) { 146 content::BrowserContext* browser_context) {
147 return make_scoped_ptr(new PersistentTabRestoreService( 147 return make_scoped_ptr(new sessions::PersistentTabRestoreService(
148 make_scoped_ptr(new ChromeTabRestoreServiceClient( 148 make_scoped_ptr(new ChromeTabRestoreServiceClient(
149 Profile::FromBrowserContext(browser_context))), 149 Profile::FromBrowserContext(browser_context))),
150 nullptr)); 150 nullptr));
151 } 151 }
152 152
153 sync_driver::OpenTabsUIDelegate* GetOpenTabsDelegate() { 153 sync_driver::OpenTabsUIDelegate* GetOpenTabsDelegate() {
154 return manager_.get(); 154 return manager_.get();
155 } 155 }
156 156
157 void RegisterRecentTabs(RecentTabsBuilderTestHelper* helper) { 157 void RegisterRecentTabs(RecentTabsBuilderTestHelper* helper) {
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 // 2 Recently closed heaer (disabled) 594 // 2 Recently closed heaer (disabled)
595 // 3 <separator> 595 // 3 <separator>
596 // 4 No tabs from other Devices 596 // 4 No tabs from other Devices
597 597
598 TestRecentTabsSubMenuModel model(NULL, browser(), NULL); 598 TestRecentTabsSubMenuModel model(NULL, browser(), NULL);
599 EXPECT_EQ(5, model.GetItemCount()); 599 EXPECT_EQ(5, model.GetItemCount());
600 EXPECT_EQ(-1, model.GetMaxWidthForItemAtIndex(2)); 600 EXPECT_EQ(-1, model.GetMaxWidthForItemAtIndex(2));
601 EXPECT_NE(-1, model.GetMaxWidthForItemAtIndex(3)); 601 EXPECT_NE(-1, model.GetMaxWidthForItemAtIndex(3));
602 EXPECT_EQ(-1, model.GetMaxWidthForItemAtIndex(4)); 602 EXPECT_EQ(-1, model.GetMaxWidthForItemAtIndex(4));
603 } 603 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc ('k') | chrome/browser/ui/views/frame/global_menu_bar_x11.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698