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

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

Issue 10692195: Consolidate Browser Creation. (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
« no previous file with comments | « chrome/browser/ui/browser_browsertest.cc ('k') | chrome/browser/ui/browser_commands.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/logging.h" 6 #include "base/logging.h"
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "base/stringprintf.h" 8 #include "base/stringprintf.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/download/download_service.h" 10 #include "chrome/browser/download/download_service.h"
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 scoped_refptr<DownloadTestFlushObserver> observer( 164 scoped_refptr<DownloadTestFlushObserver> observer(
165 new DownloadTestFlushObserver(mgr)); 165 new DownloadTestFlushObserver(mgr));
166 observer->WaitForFlush(); 166 observer->WaitForFlush();
167 } 167 }
168 } 168 }
169 } 169 }
170 } 170 }
171 171
172 // Create a Browser (with associated window) on the specified profile. 172 // Create a Browser (with associated window) on the specified profile.
173 Browser* CreateBrowserOnProfile(Profile* profile) { 173 Browser* CreateBrowserOnProfile(Profile* profile) {
174 Browser* new_browser = Browser::Create(profile); 174 Browser* new_browser = new Browser(Browser::CreateParams(profile));
175 chrome::AddSelectedTabWithURL(new_browser, GURL(chrome::kAboutBlankURL), 175 chrome::AddSelectedTabWithURL(new_browser, GURL(chrome::kAboutBlankURL),
176 content::PAGE_TRANSITION_START_PAGE); 176 content::PAGE_TRANSITION_START_PAGE);
177 ui_test_utils::WaitForLoadStop( 177 ui_test_utils::WaitForLoadStop(
178 chrome::GetActiveWebContents(new_browser)); 178 chrome::GetActiveWebContents(new_browser));
179 new_browser->window()->Show(); 179 new_browser->window()->Show();
180 return new_browser; 180 return new_browser;
181 } 181 }
182 182
183 // Adjust the number of browsers and associated windows up or down 183 // Adjust the number of browsers and associated windows up or down
184 // to |num_windows|. This routine assumes that there is only a single 184 // to |num_windows|. This routine assumes that there is only a single
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 } 569 }
570 } 570 }
571 571
572 IN_PROC_BROWSER_TEST_F(BrowserCloseTest, MAYBE_DownloadsCloseCheck_5) { 572 IN_PROC_BROWSER_TEST_F(BrowserCloseTest, MAYBE_DownloadsCloseCheck_5) {
573 ASSERT_TRUE(SetupForDownloadCloseCheck()); 573 ASSERT_TRUE(SetupForDownloadCloseCheck());
574 for (size_t i = 5 * arraysize(download_close_check_cases) / 6; 574 for (size_t i = 5 * arraysize(download_close_check_cases) / 6;
575 i < 6 * arraysize(download_close_check_cases) / 6; ++i) { 575 i < 6 * arraysize(download_close_check_cases) / 6; ++i) {
576 ExecuteDownloadCloseCheckCase(i); 576 ExecuteDownloadCloseCheckCase(i);
577 } 577 }
578 } 578 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_browsertest.cc ('k') | chrome/browser/ui/browser_commands.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698