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

Unified Diff: chrome/browser/download/download_request_limiter_unittest.cc

Issue 2561673003: Handle per-tab AUTOMATIC_DOWNLOADS setting in DownloadRequestLimiter. (Closed)
Patch Set: Fix whitespace Created 3 years, 10 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
Index: chrome/browser/download/download_request_limiter_unittest.cc
diff --git a/chrome/browser/download/download_request_limiter_unittest.cc b/chrome/browser/download/download_request_limiter_unittest.cc
index 14d15026609ad3aeacccf0acd276e31848ee1a05..eb7aec2ad82168179d31bc65216a2d4fd5e33aae 100644
--- a/chrome/browser/download/download_request_limiter_unittest.cc
+++ b/chrome/browser/download/download_request_limiter_unittest.cc
@@ -212,13 +212,6 @@ class DownloadRequestLimiterTest : public ChromeRenderViewHostTestHarness {
// Ensure a download state exists.
download_request_limiter_->GetDownloadState(web_contents, nullptr, true);
SetHostContentSetting(web_contents, setting);
-
- // Manually send the update notification. In the browser, this is sent from
- // ContentSettingRPHBubbleModel.
- content::NotificationService::current()->Notify(
- chrome::NOTIFICATION_WEB_CONTENT_SETTINGS_CHANGED,
- content::Source<WebContents>(web_contents),
- content::NotificationService::NoDetails());
}
protected:
@@ -650,19 +643,19 @@ TEST_F(DownloadRequestLimiterTest,
CanDownload();
ExpectAndResetCounts(1, 0, 0, __LINE__);
- ASSERT_EQ(DownloadRequestLimiter::PROMPT_BEFORE_DOWNLOAD,
+ ASSERT_EQ(DownloadRequestLimiter::ALLOW_ALL_DOWNLOADS,
download_request_limiter_->GetDownloadStatus(web_contents()));
SetHostContentSetting(web_contents(), CONTENT_SETTING_BLOCK);
CanDownload();
ExpectAndResetCounts(0, 1, 0, __LINE__);
- ASSERT_EQ(DownloadRequestLimiter::PROMPT_BEFORE_DOWNLOAD,
+ ASSERT_EQ(DownloadRequestLimiter::DOWNLOADS_NOT_ALLOWED,
download_request_limiter_->GetDownloadStatus(web_contents()));
CanDownload();
ExpectAndResetCounts(0, 1, 0, __LINE__);
- ASSERT_EQ(DownloadRequestLimiter::PROMPT_BEFORE_DOWNLOAD,
+ ASSERT_EQ(DownloadRequestLimiter::DOWNLOADS_NOT_ALLOWED,
download_request_limiter_->GetDownloadStatus(web_contents()));
}

Powered by Google App Engine
This is Rietveld 408576698