OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 } | 166 } |
167 } | 167 } |
168 } | 168 } |
169 | 169 |
170 // Create a Browser (with associated window) on the specified profile. | 170 // Create a Browser (with associated window) on the specified profile. |
171 Browser* CreateBrowserOnProfile(Profile* profile) { | 171 Browser* CreateBrowserOnProfile(Profile* profile) { |
172 Browser* new_browser = Browser::Create(profile); | 172 Browser* new_browser = Browser::Create(profile); |
173 new_browser->AddSelectedTabWithURL(GURL(chrome::kAboutBlankURL), | 173 new_browser->AddSelectedTabWithURL(GURL(chrome::kAboutBlankURL), |
174 content::PAGE_TRANSITION_START_PAGE); | 174 content::PAGE_TRANSITION_START_PAGE); |
175 ui_test_utils::WaitForLoadStop( | 175 ui_test_utils::WaitForLoadStop( |
176 new_browser->GetSelectedTabContents()); | 176 new_browser->GetSelectedWebContents()); |
177 new_browser->window()->Show(); | 177 new_browser->window()->Show(); |
178 return new_browser; | 178 return new_browser; |
179 } | 179 } |
180 | 180 |
181 // Adjust the number of browsers and associated windows up or down | 181 // Adjust the number of browsers and associated windows up or down |
182 // to |num_windows|. This routine assumes that there is only a single | 182 // to |num_windows|. This routine assumes that there is only a single |
183 // browser associated with the profile on entry. |*base_browser| contains | 183 // browser associated with the profile on entry. |*base_browser| contains |
184 // this browser, and the profile is derived from that browser. On output, | 184 // this browser, and the profile is derived from that browser. On output, |
185 // if |*base_browser| was destroyed (because |num_windows == 0|), NULL | 185 // if |*base_browser| was destroyed (because |num_windows == 0|), NULL |
186 // is assigned to that memory location. | 186 // is assigned to that memory location. |
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 } | 541 } |
542 } | 542 } |
543 | 543 |
544 IN_PROC_BROWSER_TEST_F(BrowserCloseTest, DownloadsCloseCheck_5) { | 544 IN_PROC_BROWSER_TEST_F(BrowserCloseTest, DownloadsCloseCheck_5) { |
545 ASSERT_TRUE(SetupForDownloadCloseCheck()); | 545 ASSERT_TRUE(SetupForDownloadCloseCheck()); |
546 for (size_t i = 5 * arraysize(download_close_check_cases) / 6; | 546 for (size_t i = 5 * arraysize(download_close_check_cases) / 6; |
547 i < 6 * arraysize(download_close_check_cases) / 6; ++i) { | 547 i < 6 * arraysize(download_close_check_cases) / 6; ++i) { |
548 ExecuteDownloadCloseCheckCase(i); | 548 ExecuteDownloadCloseCheckCase(i); |
549 } | 549 } |
550 } | 550 } |
OLD | NEW |