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

Unified Diff: chrome/browser/ui/browser_close_browsertest.cc

Issue 26938003: Don't prompt to save malicious downloads on exit (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed unneeded code Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | content/browser/download/download_manager_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_close_browsertest.cc
diff --git a/chrome/browser/ui/browser_close_browsertest.cc b/chrome/browser/ui/browser_close_browsertest.cc
index 4f2b14503671a1d1a37b75478829cea3db9a3379..cbc544c5bf4ed60cb915b8ce99500c066a168ee8 100644
--- a/chrome/browser/ui/browser_close_browsertest.cc
+++ b/chrome/browser/ui/browser_close_browsertest.cc
@@ -255,6 +255,8 @@ class BrowserCloseTest : public InProcessBrowserTest {
// an assertion has failed and the test should be aborted.
bool ExecuteDownloadCloseCheckCase(size_t i) {
const DownloadsCloseCheckCase& check_case(download_close_check_cases[i]);
+ SCOPED_TRACE(testing::Message() << "Case" << i
+ << ": " << check_case.DebugString());
// Test invariant: so that we don't actually try and close the browser,
// we always enter the function with a single browser window open on the
@@ -270,18 +272,14 @@ class BrowserCloseTest : public InProcessBrowserTest {
return false;
Browser* entry_browser = FirstUnclosedBrowser();
- EXPECT_EQ(first_profile_, entry_browser->profile())
- << "Case" << i
- << ": " << check_case.DebugString();
+ EXPECT_EQ(first_profile_, entry_browser->profile());
if (first_profile_ != entry_browser->profile())
return false;
- int total_download_count = DownloadService::DownloadCountAllProfiles();
- EXPECT_EQ(0, total_download_count)
- << "Case " << i
- << ": " << check_case.DebugString();
+ int total_download_count =
+ DownloadService::NonMaliciousDownloadCountAllProfiles();
+ EXPECT_EQ(0, total_download_count);
if (0 != total_download_count)
return false;
-
Profile* first_profile_incognito = first_profile_->GetOffTheRecordProfile();
Profile* second_profile_incognito =
second_profile_->GetOffTheRecordProfile();
@@ -356,12 +354,9 @@ class BrowserCloseTest : public InProcessBrowserTest {
Browser::DownloadClosePreventionType type =
browser_to_probe->OkToCloseWithInProgressDownloads(
&num_downloads_blocking);
- EXPECT_EQ(check_case.type, type) << "Case " << i
- << ": " << check_case.DebugString();
+ EXPECT_EQ(check_case.type, type);
if (type != Browser::DOWNLOAD_CLOSE_OK)
- EXPECT_EQ(check_case.num_blocking, num_downloads_blocking)
- << "Case " << i
- << ": " << check_case.DebugString();
+ EXPECT_EQ(check_case.num_blocking, num_downloads_blocking);
// Release all the downloads.
CompleteAllDownloads(browser_to_probe);
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | content/browser/download/download_manager_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698