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

Unified Diff: chrome/browser/notifications/notification_interactive_uitest_support.cc

Issue 2910843002: [Cleanup] Move all browsertests to use ScopedFeatureList to modify features
Patch Set: Move SFL calls to constructor Created 3 years, 5 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/notifications/notification_interactive_uitest_support.cc
diff --git a/chrome/browser/notifications/notification_interactive_uitest_support.cc b/chrome/browser/notifications/notification_interactive_uitest_support.cc
index 4a71efed6bd8ecbdab2db0a0f3b9d82ab46464a4..30d6f6fa15a5cb9367fb0cadb3d290ee3457035a 100644
--- a/chrome/browser/notifications/notification_interactive_uitest_support.cc
+++ b/chrome/browser/notifications/notification_interactive_uitest_support.cc
@@ -118,9 +118,7 @@ bool MessageCenterChangeObserver::Wait() {
// -----------------------------------------------------------------------------
-void NotificationsTest::SetUpDefaultCommandLine(
- base::CommandLine* command_line) {
- InProcessBrowserTest::SetUpDefaultCommandLine(command_line);
+NotificationsTest::NotificationsTest() {
// Temporary change while the whole support class is changed to deal
// with native notifications. crbug.com/714679
#if BUILDFLAG(ENABLE_NATIVE_NOTIFICATIONS)
@@ -305,46 +303,25 @@ content::WebContents* NotificationsTest::GetActiveWebContents(
void NotificationsTest::EnablePermissionsEmbargo(
base::test::ScopedFeatureList* scoped_feature_list) {
-#if BUILDFLAG(ENABLE_NATIVE_NOTIFICATIONS)
- scoped_feature_list->InitWithFeatures(
- {features::kBlockPromptsIfDismissedOften,
- features::kBlockPromptsIfIgnoredOften},
- {features::kNativeNotifications});
-#else
scoped_feature_list->InitWithFeatures(
{features::kBlockPromptsIfDismissedOften,
features::kBlockPromptsIfIgnoredOften},
{});
-#endif // BUILDFLAG(ENABLE_NATIVE_NOTIFICATIONS)
}
void NotificationsTest::EnableFullscreenNotifications(
base::test::ScopedFeatureList* scoped_feature_list) {
-#if BUILDFLAG(ENABLE_NATIVE_NOTIFICATIONS)
- scoped_feature_list->InitWithFeatures(
- {features::kPreferHtmlOverPlugins,
- features::kAllowFullscreenWebNotificationsFeature},
- {features::kNativeNotifications});
-#else
scoped_feature_list->InitWithFeatures(
{features::kPreferHtmlOverPlugins,
features::kAllowFullscreenWebNotificationsFeature},
{});
-#endif // BUILDFLAG(ENABLE_NATIVE_NOTIFICATIONS)
}
void NotificationsTest::DisableFullscreenNotifications(
base::test::ScopedFeatureList* scoped_feature_list) {
-#if BUILDFLAG(ENABLE_NATIVE_NOTIFICATIONS)
- scoped_feature_list->InitWithFeatures(
- {features::kPreferHtmlOverPlugins},
- {features::kAllowFullscreenWebNotificationsFeature,
- features::kNativeNotifications});
-#else
scoped_feature_list->InitWithFeatures(
{features::kPreferHtmlOverPlugins},
{features::kAllowFullscreenWebNotificationsFeature});
-#endif // BUILDFLAG(ENABLE_NATIVE_NOTIFICATIONS)
}
void NotificationsTest::DropOriginPreference(const GURL& origin) {

Powered by Google App Engine
This is Rietveld 408576698