Chromium Code Reviews| 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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 268 EXPECT_EQ(1, unclosed_browsers); | 268 EXPECT_EQ(1, unclosed_browsers); |
| 269 if (1 != unclosed_browsers) | 269 if (1 != unclosed_browsers) |
| 270 return false; | 270 return false; |
| 271 | 271 |
| 272 Browser* entry_browser = FirstUnclosedBrowser(); | 272 Browser* entry_browser = FirstUnclosedBrowser(); |
| 273 EXPECT_EQ(first_profile_, entry_browser->profile()) | 273 EXPECT_EQ(first_profile_, entry_browser->profile()) |
| 274 << "Case" << i | 274 << "Case" << i |
| 275 << ": " << check_case.DebugString(); | 275 << ": " << check_case.DebugString(); |
| 276 if (first_profile_ != entry_browser->profile()) | 276 if (first_profile_ != entry_browser->profile()) |
| 277 return false; | 277 return false; |
| 278 int nondangerous_download_count = | |
| 279 DownloadService::NonDangerousDownloadCountAllProfiles(); | |
| 280 EXPECT_EQ(0, nondangerous_download_count) | |
| 281 << "Case " << i | |
| 282 << ": " << check_case.DebugString(); | |
|
asanka
2013/10/11 16:02:35
Minor nit: Adding a SCOPED_TRACE at the top of the
felt
2013/10/11 17:26:44
I assume you mean for the whole file, not just for
asanka
2013/10/11 19:09:42
Yup. However, my suggestion seems to have been mis
felt
2013/10/11 23:41:10
Done.
| |
| 283 if (0 != nondangerous_download_count) | |
| 284 return false; | |
| 278 int total_download_count = DownloadService::DownloadCountAllProfiles(); | 285 int total_download_count = DownloadService::DownloadCountAllProfiles(); |
| 279 EXPECT_EQ(0, total_download_count) | 286 EXPECT_EQ(0, total_download_count) |
| 280 << "Case " << i | 287 << "Case " << i |
| 281 << ": " << check_case.DebugString(); | 288 << ": " << check_case.DebugString(); |
| 282 if (0 != total_download_count) | 289 if (0 != total_download_count) |
| 283 return false; | 290 return false; |
| 284 | |
| 285 Profile* first_profile_incognito = first_profile_->GetOffTheRecordProfile(); | 291 Profile* first_profile_incognito = first_profile_->GetOffTheRecordProfile(); |
| 286 Profile* second_profile_incognito = | 292 Profile* second_profile_incognito = |
| 287 second_profile_->GetOffTheRecordProfile(); | 293 second_profile_->GetOffTheRecordProfile(); |
| 288 DownloadTestFileActivityObserver(first_profile_incognito) | 294 DownloadTestFileActivityObserver(first_profile_incognito) |
| 289 .EnableFileChooser(false); | 295 .EnableFileChooser(false); |
| 290 DownloadTestFileActivityObserver(second_profile_incognito) | 296 DownloadTestFileActivityObserver(second_profile_incognito) |
| 291 .EnableFileChooser(false); | 297 .EnableFileChooser(false); |
| 292 | 298 |
| 293 // For simplicty of coding, we create a window on each profile so that | 299 // For simplicty of coding, we create a window on each profile so that |
| 294 // we can easily create downloads, then we destroy or create windows | 300 // we can easily create downloads, then we destroy or create windows |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 565 } | 571 } |
| 566 } | 572 } |
| 567 | 573 |
| 568 IN_PROC_BROWSER_TEST_F(BrowserCloseTest, MAYBE_DownloadsCloseCheck_5) { | 574 IN_PROC_BROWSER_TEST_F(BrowserCloseTest, MAYBE_DownloadsCloseCheck_5) { |
| 569 ASSERT_TRUE(SetupForDownloadCloseCheck()); | 575 ASSERT_TRUE(SetupForDownloadCloseCheck()); |
| 570 for (size_t i = 5 * arraysize(download_close_check_cases) / 6; | 576 for (size_t i = 5 * arraysize(download_close_check_cases) / 6; |
| 571 i < 6 * arraysize(download_close_check_cases) / 6; ++i) { | 577 i < 6 * arraysize(download_close_check_cases) / 6; ++i) { |
| 572 ExecuteDownloadCloseCheckCase(i); | 578 ExecuteDownloadCloseCheckCase(i); |
| 573 } | 579 } |
| 574 } | 580 } |
| OLD | NEW |