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

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

Issue 11392004: Remove TabContents from AddBlankTabAt, kill AddBlankTab. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 Browser* browser) const { 75 Browser* browser) const {
76 chrome::NavigateParams params(browser, GetGoogleURL(), 76 chrome::NavigateParams params(browser, GetGoogleURL(),
77 content::PAGE_TRANSITION_LINK); 77 content::PAGE_TRANSITION_LINK);
78 params.window_action = chrome::NavigateParams::SHOW_WINDOW; 78 params.window_action = chrome::NavigateParams::SHOW_WINDOW;
79 return params; 79 return params;
80 } 80 }
81 81
82 Browser* BrowserNavigatorTest::CreateEmptyBrowserForType(Browser::Type type, 82 Browser* BrowserNavigatorTest::CreateEmptyBrowserForType(Browser::Type type,
83 Profile* profile) { 83 Profile* profile) {
84 Browser* browser = new Browser(Browser::CreateParams(type, profile)); 84 Browser* browser = new Browser(Browser::CreateParams(type, profile));
85 chrome::AddBlankTab(browser, true); 85 chrome::AddBlankTabAt(browser, -1, true);
86 return browser; 86 return browser;
87 } 87 }
88 88
89 Browser* BrowserNavigatorTest::CreateEmptyBrowserForApp(Browser::Type type, 89 Browser* BrowserNavigatorTest::CreateEmptyBrowserForApp(Browser::Type type,
90 Profile* profile) { 90 Profile* profile) {
91 Browser* browser = new Browser( 91 Browser* browser = new Browser(
92 Browser::CreateParams::CreateForApp( 92 Browser::CreateParams::CreateForApp(
93 Browser::TYPE_POPUP, "Test", gfx::Rect(), profile)); 93 Browser::TYPE_POPUP, "Test", gfx::Rect(), profile));
94 chrome::AddBlankTab(browser, true); 94 chrome::AddBlankTabAt(browser, -1, true);
95 return browser; 95 return browser;
96 } 96 }
97 97
98 TabContents* BrowserNavigatorTest::CreateTabContents() { 98 TabContents* BrowserNavigatorTest::CreateTabContents() {
99 return chrome::TabContentsFactory( 99 return chrome::TabContentsFactory(
100 browser()->profile(), 100 browser()->profile(),
101 NULL, 101 NULL,
102 MSG_ROUTING_NONE, 102 MSG_ROUTING_NONE,
103 chrome::GetActiveWebContents(browser())); 103 chrome::GetActiveWebContents(browser()));
104 } 104 }
(...skipping 1147 matching lines...) Expand 10 before | Expand all | Expand 10 after
1252 // Now navigate using the incognito profile and check that a new window 1252 // Now navigate using the incognito profile and check that a new window
1253 // is created. 1253 // is created.
1254 chrome::NavigateParams params_incognito( 1254 chrome::NavigateParams params_incognito(
1255 browser()->profile()->GetOffTheRecordProfile(), 1255 browser()->profile()->GetOffTheRecordProfile(),
1256 GetGoogleURL(), content::PAGE_TRANSITION_LINK); 1256 GetGoogleURL(), content::PAGE_TRANSITION_LINK);
1257 ui_test_utils::NavigateToURL(&params_incognito); 1257 ui_test_utils::NavigateToURL(&params_incognito);
1258 EXPECT_EQ(2u, BrowserList::size()); 1258 EXPECT_EQ(2u, BrowserList::size());
1259 } 1259 }
1260 1260
1261 } // namespace 1261 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_focus_uitest.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