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

Unified Diff: chrome/browser/banners/app_banner_settings_helper_unittest.cc

Issue 2397043002: Allow variations controls for the time banners are suppressed after ignore/dismiss. (Closed)
Patch Set: Created 4 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/banners/app_banner_settings_helper.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/banners/app_banner_settings_helper_unittest.cc
diff --git a/chrome/browser/banners/app_banner_settings_helper_unittest.cc b/chrome/browser/banners/app_banner_settings_helper_unittest.cc
index fe1756f8d2510db875a043095780d6fa37304bd7..d7abe63fab64004687cbaf166246690ace847433 100644
--- a/chrome/browser/banners/app_banner_settings_helper_unittest.cc
+++ b/chrome/browser/banners/app_banner_settings_helper_unittest.cc
@@ -649,6 +649,13 @@ TEST_F(AppBannerSettingsHelperTest, ShouldNotShowAfterBlocking) {
EXPECT_EQ(PREVIOUSLY_BLOCKED,
AppBannerSettingsHelper::ShouldShowBanner(
web_contents(), url, kTestPackageName, reference_time));
+
+ // Change the number of days enforced.
+ AppBannerSettingsHelper::SetDaysAfterDismissAndIgnoreToTrigger(59, 14);
+
+ EXPECT_EQ(NO_ERROR_DETECTED,
+ AppBannerSettingsHelper::ShouldShowBanner(
+ web_contents(), url, kTestPackageName, reference_time));
}
TEST_F(AppBannerSettingsHelperTest, ShouldNotShowAfterShowing) {
@@ -691,6 +698,13 @@ TEST_F(AppBannerSettingsHelperTest, ShouldNotShowAfterShowing) {
EXPECT_EQ(PREVIOUSLY_IGNORED,
AppBannerSettingsHelper::ShouldShowBanner(
web_contents(), url, kTestPackageName, reference_time));
+
+ // Change the number of days enforced.
+ AppBannerSettingsHelper::SetDaysAfterDismissAndIgnoreToTrigger(90, 6);
+
+ EXPECT_EQ(NO_ERROR_DETECTED,
+ AppBannerSettingsHelper::ShouldShowBanner(
+ web_contents(), url, kTestPackageName, reference_time));
}
TEST_F(AppBannerSettingsHelperTest, ShouldNotShowAfterAdding) {
« no previous file with comments | « chrome/browser/banners/app_banner_settings_helper.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698