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

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

Issue 2888303004: Minimize the delegate dependencies for non persistent notifications. (Closed)
Patch Set: review Created 3 years, 7 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 21467c6b3d2550fa858fd4977901bd93fdad9beb..36bd4050fd35ba64b6116bf3a75526c4e9e656b9 100644
--- a/chrome/browser/notifications/notification_interactive_uitest_support.cc
+++ b/chrome/browser/notifications/notification_interactive_uitest_support.cc
@@ -122,10 +122,10 @@ void NotificationsTest::SetUpDefaultCommandLine(
InProcessBrowserTest::SetUpDefaultCommandLine(command_line);
// Temporary change while the whole support class is changed to deal
// with native notifications. crbug.com/714679
-#if defined(OS_MACOSX)
+#if BUILDFLAG(ENABLE_NATIVE_NOTIFICATIONS)
command_line->AppendSwitchASCII(switches::kDisableFeatures,
features::kNativeNotifications.name);
-#endif
+#endif // BUILDFLAG(ENABLE_NATIVE_NOTIFICATIONS)
}
int NotificationsTest::GetNotificationCount() {
@@ -294,16 +294,30 @@ content::WebContents* NotificationsTest::GetActiveWebContents(
}
void NotificationsTest::EnableFullscreenNotifications() {
+#if BUILDFLAG(ENABLE_NATIVE_NOTIFICATIONS)
+ feature_list_.InitWithFeatures(
+ {features::kPreferHtmlOverPlugins,
+ features::kAllowFullscreenWebNotificationsFeature},
+ {features::kNativeNotifications});
+#else
feature_list_.InitWithFeatures(
{features::kPreferHtmlOverPlugins,
features::kAllowFullscreenWebNotificationsFeature},
{});
+#endif // BUILDFLAG(ENABLE_NATIVE_NOTIFICATIONS)
}
void NotificationsTest::DisableFullscreenNotifications() {
+#if BUILDFLAG(ENABLE_NATIVE_NOTIFICATIONS)
+ feature_list_.InitWithFeatures(
+ {features::kPreferHtmlOverPlugins},
+ {features::kAllowFullscreenWebNotificationsFeature,
+ features::kNativeNotifications});
+#else
feature_list_.InitWithFeatures(
{features::kPreferHtmlOverPlugins},
{features::kAllowFullscreenWebNotificationsFeature});
+#endif // BUILDFLAG(ENABLE_NATIVE_NOTIFICATIONS)
}
void NotificationsTest::DropOriginPreference(const GURL& origin) {
« no previous file with comments | « chrome/browser/notifications/notification_handler.h ('k') | chrome/browser/notifications/persistent_notification_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698