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

Unified Diff: chrome/browser/notifications/platform_notification_service_interactive_uitest.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/platform_notification_service_interactive_uitest.cc
diff --git a/chrome/browser/notifications/platform_notification_service_interactive_uitest.cc b/chrome/browser/notifications/platform_notification_service_interactive_uitest.cc
index dae163b3b44ad133d99abe80ca53b944d4a848bf..5a9a85e49acbd5d57462601f19c6b74ed6c33221 100644
--- a/chrome/browser/notifications/platform_notification_service_interactive_uitest.cc
+++ b/chrome/browser/notifications/platform_notification_service_interactive_uitest.cc
@@ -68,7 +68,8 @@ class PlatformNotificationServiceBrowserTest : public InProcessBrowserTest {
~PlatformNotificationServiceBrowserTest() override {}
// InProcessBrowserTest overrides.
- void SetUpCommandLine(base::CommandLine* command_line) override;
+ void SetUpDefaultCommandLine(base::CommandLine* command_line) override;
+
void SetUp() override;
void SetUpOnMainThread() override;
void TearDown() override;
@@ -136,11 +137,19 @@ PlatformNotificationServiceBrowserTest::PlatformNotificationServiceBrowserTest()
// filesystem.
test_page_url_(std::string("/") + kTestFileName) {}
-void PlatformNotificationServiceBrowserTest::SetUpCommandLine(
+void PlatformNotificationServiceBrowserTest::SetUpDefaultCommandLine(
base::CommandLine* command_line) {
+ InProcessBrowserTest::SetUpDefaultCommandLine(command_line);
+
+ // Needed for the Reply button tests
command_line->AppendSwitch(switches::kEnableExperimentalWebPlatformFeatures);
- InProcessBrowserTest::SetUpCommandLine(command_line);
+#if BUILDFLAG(ENABLE_NATIVE_NOTIFICATIONS)
+ // TODO(crbug.com/714679): Temporary change while tests are upgraded to deal
+ // with native notifications.
+ command_line->AppendSwitchASCII(switches::kDisableFeatures,
+ features::kNativeNotifications.name);
+#endif // BUILDFLAG(ENABLE_NATIVE_NOTIFICATIONS)
}
void PlatformNotificationServiceBrowserTest::SetUp() {
@@ -824,8 +833,14 @@ class PlatformNotificationServiceWithoutContentImageBrowserTest
public:
// InProcessBrowserTest overrides.
void SetUpInProcessBrowserTestFixture() override {
- scoped_feature_list_.InitAndDisableFeature(
- features::kNotificationContentImage);
+#if BUILDFLAG(ENABLE_NATIVE_NOTIFICATIONS)
+ scoped_feature_list_.InitWithFeatures(
+ {},
+ {features::kNotificationContentImage, features::kNativeNotifications});
+#else
+ scoped_feature_list_.InitWithFeatures(
+ {}, {features::kNotificationContentImage});
+#endif // BUILDFLAG(ENABLE_NATIVE_NOTIFICATIONS)
InProcessBrowserTest::SetUpInProcessBrowserTestFixture();
}

Powered by Google App Engine
This is Rietveld 408576698