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

Side by Side Diff: chrome/browser/notifications/platform_notification_service_interactive_uitest.cc

Issue 2910843002: [Cleanup] Move all browsertests to use ScopedFeatureList to modify features
Patch Set: rebase update Created 3 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <memory> 5 #include <memory>
6 #include <string> 6 #include <string>
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/feature_list.h" 10 #include "base/feature_list.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 void PlatformNotificationServiceBrowserTest::SetUpDefaultCommandLine( 140 void PlatformNotificationServiceBrowserTest::SetUpDefaultCommandLine(
141 base::CommandLine* command_line) { 141 base::CommandLine* command_line) {
142 InProcessBrowserTest::SetUpDefaultCommandLine(command_line); 142 InProcessBrowserTest::SetUpDefaultCommandLine(command_line);
143 143
144 // Needed for the Reply button tests 144 // Needed for the Reply button tests
145 command_line->AppendSwitch(switches::kEnableExperimentalWebPlatformFeatures); 145 command_line->AppendSwitch(switches::kEnableExperimentalWebPlatformFeatures);
146 146
147 #if BUILDFLAG(ENABLE_NATIVE_NOTIFICATIONS) 147 #if BUILDFLAG(ENABLE_NATIVE_NOTIFICATIONS)
148 // TODO(crbug.com/714679): Temporary change while tests are upgraded to deal 148 // TODO(crbug.com/714679): Temporary change while tests are upgraded to deal
149 // with native notifications. 149 // with native notifications.
150 command_line->AppendSwitchASCII(switches::kDisableFeatures, 150 feature_list_.InitAndDisableFeature(features::kNativeNotifications);
151 features::kNativeNotifications.name);
152 #endif // BUILDFLAG(ENABLE_NATIVE_NOTIFICATIONS) 151 #endif // BUILDFLAG(ENABLE_NATIVE_NOTIFICATIONS)
153 } 152 }
154 153
155 void PlatformNotificationServiceBrowserTest::SetUp() { 154 void PlatformNotificationServiceBrowserTest::SetUp() {
156 ui_manager_.reset(new StubNotificationUIManager); 155 ui_manager_.reset(new StubNotificationUIManager);
157 https_server_.reset( 156 https_server_.reset(
158 new net::EmbeddedTestServer(net::EmbeddedTestServer::TYPE_HTTPS)); 157 new net::EmbeddedTestServer(net::EmbeddedTestServer::TYPE_HTTPS));
159 https_server_->ServeFilesFromSourceDirectory(server_root_); 158 https_server_->ServeFilesFromSourceDirectory(server_root_);
160 ASSERT_TRUE(https_server_->Start()); 159 ASSERT_TRUE(https_server_->Start());
161 InProcessBrowserTest::SetUp(); 160 InProcessBrowserTest::SetUp();
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after
855 RunScript("DisplayPersistentAllOptionsNotification()", &script_result)); 854 RunScript("DisplayPersistentAllOptionsNotification()", &script_result));
856 EXPECT_EQ("ok", script_result); 855 EXPECT_EQ("ok", script_result);
857 856
858 ASSERT_EQ(1u, ui_manager()->GetNotificationCount()); 857 ASSERT_EQ(1u, ui_manager()->GetNotificationCount());
859 const Notification& notification = ui_manager()->GetNotificationAt(0); 858 const Notification& notification = ui_manager()->GetNotificationAt(0);
860 859
861 // Since the kNotificationContentImage kill switch has disabled images, the 860 // Since the kNotificationContentImage kill switch has disabled images, the
862 // notification should be shown without an image. 861 // notification should be shown without an image.
863 EXPECT_TRUE(notification.image().IsEmpty()); 862 EXPECT_TRUE(notification.image().IsEmpty());
864 } 863 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698