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

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

Issue 2952163002: Remove InProcessBrowserTest::SetUpOnMainThread() calls. (Closed)
Patch Set: rebase 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 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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 InProcessBrowserTest::SetUp(); 162 InProcessBrowserTest::SetUp();
163 } 163 }
164 164
165 void PlatformNotificationServiceBrowserTest::SetUpOnMainThread() { 165 void PlatformNotificationServiceBrowserTest::SetUpOnMainThread() {
166 SiteEngagementScore::SetParamValuesForTesting(); 166 SiteEngagementScore::SetParamValuesForTesting();
167 engagement_service_ = SiteEngagementService::Get(browser()->profile()); 167 engagement_service_ = SiteEngagementService::Get(browser()->profile());
168 NavigateToTestPage(test_page_url_); 168 NavigateToTestPage(test_page_url_);
169 display_service_.reset( 169 display_service_.reset(
170 new MessageCenterDisplayService(browser()->profile(), ui_manager_.get())); 170 new MessageCenterDisplayService(browser()->profile(), ui_manager_.get()));
171 service()->SetNotificationDisplayServiceForTesting(display_service_.get()); 171 service()->SetNotificationDisplayServiceForTesting(display_service_.get());
172 InProcessBrowserTest::SetUpOnMainThread();
173 } 172 }
174 173
175 void PlatformNotificationServiceBrowserTest::TearDown() { 174 void PlatformNotificationServiceBrowserTest::TearDown() {
176 service()->SetNotificationDisplayServiceForTesting(nullptr); 175 service()->SetNotificationDisplayServiceForTesting(nullptr);
177 } 176 }
178 177
179 void PlatformNotificationServiceBrowserTest:: 178 void PlatformNotificationServiceBrowserTest::
180 GrantNotificationPermissionForTest() const { 179 GrantNotificationPermissionForTest() const {
181 GURL origin = TestPageUrl().GetOrigin(); 180 GURL origin = TestPageUrl().GetOrigin();
182 181
(...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after
856 RunScript("DisplayPersistentAllOptionsNotification()", &script_result)); 855 RunScript("DisplayPersistentAllOptionsNotification()", &script_result));
857 EXPECT_EQ("ok", script_result); 856 EXPECT_EQ("ok", script_result);
858 857
859 ASSERT_EQ(1u, ui_manager()->GetNotificationCount()); 858 ASSERT_EQ(1u, ui_manager()->GetNotificationCount());
860 const Notification& notification = ui_manager()->GetNotificationAt(0); 859 const Notification& notification = ui_manager()->GetNotificationAt(0);
861 860
862 // Since the kNotificationContentImage kill switch has disabled images, the 861 // Since the kNotificationContentImage kill switch has disabled images, the
863 // notification should be shown without an image. 862 // notification should be shown without an image.
864 EXPECT_TRUE(notification.image().IsEmpty()); 863 EXPECT_TRUE(notification.image().IsEmpty());
865 } 864 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698