| OLD | NEW |
| 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/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
| 9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
| 10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 } | 171 } |
| 172 } | 172 } |
| 173 } | 173 } |
| 174 } | 174 } |
| 175 | 175 |
| 176 // Create a Browser (with associated window) on the specified profile. | 176 // Create a Browser (with associated window) on the specified profile. |
| 177 Browser* CreateBrowserOnProfile(Profile* profile, | 177 Browser* CreateBrowserOnProfile(Profile* profile, |
| 178 chrome::HostDesktopType host_desktop_type) { | 178 chrome::HostDesktopType host_desktop_type) { |
| 179 Browser* new_browser = | 179 Browser* new_browser = |
| 180 new Browser(Browser::CreateParams(profile, host_desktop_type)); | 180 new Browser(Browser::CreateParams(profile, host_desktop_type)); |
| 181 chrome::AddSelectedTabWithURL(new_browser, GURL(content::kAboutBlankURL), | 181 chrome::AddSelectedTabWithURL(new_browser, GURL(url::kAboutBlankURL), |
| 182 content::PAGE_TRANSITION_AUTO_TOPLEVEL); | 182 content::PAGE_TRANSITION_AUTO_TOPLEVEL); |
| 183 content::WaitForLoadStop( | 183 content::WaitForLoadStop( |
| 184 new_browser->tab_strip_model()->GetActiveWebContents()); | 184 new_browser->tab_strip_model()->GetActiveWebContents()); |
| 185 new_browser->window()->Show(); | 185 new_browser->window()->Show(); |
| 186 return new_browser; | 186 return new_browser; |
| 187 } | 187 } |
| 188 | 188 |
| 189 // Adjust the number of browsers and associated windows up or down | 189 // Adjust the number of browsers and associated windows up or down |
| 190 // to |num_windows|. This routine assumes that there is only a single | 190 // to |num_windows|. This routine assumes that there is only a single |
| 191 // browser associated with the profile on entry. |*base_browser| contains | 191 // browser associated with the profile on entry. |*base_browser| contains |
| (...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 560 } | 560 } |
| 561 } | 561 } |
| 562 | 562 |
| 563 IN_PROC_BROWSER_TEST_F(BrowserCloseTest, MAYBE_DownloadsCloseCheck_5) { | 563 IN_PROC_BROWSER_TEST_F(BrowserCloseTest, MAYBE_DownloadsCloseCheck_5) { |
| 564 ASSERT_TRUE(SetupForDownloadCloseCheck()); | 564 ASSERT_TRUE(SetupForDownloadCloseCheck()); |
| 565 for (size_t i = 5 * arraysize(download_close_check_cases) / 6; | 565 for (size_t i = 5 * arraysize(download_close_check_cases) / 6; |
| 566 i < 6 * arraysize(download_close_check_cases) / 6; ++i) { | 566 i < 6 * arraysize(download_close_check_cases) / 6; ++i) { |
| 567 ExecuteDownloadCloseCheckCase(i); | 567 ExecuteDownloadCloseCheckCase(i); |
| 568 } | 568 } |
| 569 } | 569 } |
| OLD | NEW |