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

Side by Side Diff: chrome/browser/ui/browser_navigator_browsertest.cc

Issue 10696148: Move TabStripModelDelegate off Browser into its own class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/browser_navigator_browsertest.h" 5 #include "chrome/browser/ui/browser_navigator_browsertest.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/app/chrome_command_ids.h" 8 #include "chrome/app/chrome_command_ids.h"
9 #include "chrome/browser/prefs/incognito_mode_prefs.h" 9 #include "chrome/browser/prefs/incognito_mode_prefs.h"
10 #include "chrome/browser/prefs/pref_service.h" 10 #include "chrome/browser/prefs/pref_service.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 chrome::NavigateParams params(browser, GetGoogleURL(), 63 chrome::NavigateParams params(browser, GetGoogleURL(),
64 content::PAGE_TRANSITION_LINK); 64 content::PAGE_TRANSITION_LINK);
65 params.window_action = chrome::NavigateParams::SHOW_WINDOW; 65 params.window_action = chrome::NavigateParams::SHOW_WINDOW;
66 return params; 66 return params;
67 } 67 }
68 68
69 Browser* BrowserNavigatorTest::CreateEmptyBrowserForType(Browser::Type type, 69 Browser* BrowserNavigatorTest::CreateEmptyBrowserForType(Browser::Type type,
70 Profile* profile) { 70 Profile* profile) {
71 Browser* browser = Browser::CreateWithParams( 71 Browser* browser = Browser::CreateWithParams(
72 Browser::CreateParams(type, profile)); 72 Browser::CreateParams(type, profile));
73 browser->AddBlankTab(true); 73 chrome::AddBlankTab(browser, true);
74 return browser; 74 return browser;
75 } 75 }
76 76
77 Browser* BrowserNavigatorTest::CreateEmptyBrowserForApp(Browser::Type type, 77 Browser* BrowserNavigatorTest::CreateEmptyBrowserForApp(Browser::Type type,
78 Profile* profile) { 78 Profile* profile) {
79 Browser* browser = Browser::CreateWithParams( 79 Browser* browser = Browser::CreateWithParams(
80 Browser::CreateParams::CreateForApp( 80 Browser::CreateParams::CreateForApp(
81 Browser::TYPE_POPUP, "Test", gfx::Rect(), profile)); 81 Browser::TYPE_POPUP, "Test", gfx::Rect(), profile));
82 browser->AddBlankTab(true); 82 chrome::AddBlankTab(browser, true);
83 return browser; 83 return browser;
84 } 84 }
85 85
86 TabContents* BrowserNavigatorTest::CreateTabContents() { 86 TabContents* BrowserNavigatorTest::CreateTabContents() {
87 return chrome::TabContentsFactory( 87 return chrome::TabContentsFactory(
88 browser()->profile(), 88 browser()->profile(),
89 NULL, 89 NULL,
90 MSG_ROUTING_NONE, 90 MSG_ROUTING_NONE,
91 chrome::GetActiveWebContents(browser()), 91 chrome::GetActiveWebContents(browser()),
92 NULL); 92 NULL);
(...skipping 1241 matching lines...) Expand 10 before | Expand all | Expand 10 after
1334 EXPECT_EQ(browser(), p2.browser); 1334 EXPECT_EQ(browser(), p2.browser);
1335 1335
1336 // We should now have two windows, the browser() provided by the framework and 1336 // We should now have two windows, the browser() provided by the framework and
1337 // the panel window we opened earlier. The tabbed browser window has 2 tabs. 1337 // the panel window we opened earlier. The tabbed browser window has 2 tabs.
1338 EXPECT_EQ(2u, BrowserList::size()); 1338 EXPECT_EQ(2u, BrowserList::size());
1339 EXPECT_EQ(2, browser()->tab_count()); 1339 EXPECT_EQ(2, browser()->tab_count());
1340 EXPECT_EQ(1, panel_browser->tab_count()); 1340 EXPECT_EQ(1, panel_browser->tab_count());
1341 } 1341 }
1342 1342
1343 } // namespace 1343 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_commands.cc ('k') | chrome/browser/ui/browser_tab_strip_model_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698