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

Side by Side Diff: chrome/browser/push_messaging/push_messaging_browsertest.cc

Issue 2957983002: Remove pointless InProcessBrowserTest calls. (Closed)
Patch Set: build 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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 138
139 notification_manager_.reset(new StubNotificationUIManager); 139 notification_manager_.reset(new StubNotificationUIManager);
140 140
141 SiteEngagementScore::SetParamValuesForTesting(); 141 SiteEngagementScore::SetParamValuesForTesting();
142 InProcessBrowserTest::SetUp(); 142 InProcessBrowserTest::SetUp();
143 } 143 }
144 void SetUpCommandLine(base::CommandLine* command_line) override { 144 void SetUpCommandLine(base::CommandLine* command_line) override {
145 // Enable experimental features for subscription restrictions. 145 // Enable experimental features for subscription restrictions.
146 command_line->AppendSwitch( 146 command_line->AppendSwitch(
147 switches::kEnableExperimentalWebPlatformFeatures); 147 switches::kEnableExperimentalWebPlatformFeatures);
148 InProcessBrowserTest::SetUpCommandLine(command_line);
149 } 148 }
150 149
151 // InProcessBrowserTest: 150 // InProcessBrowserTest:
152 void SetUpOnMainThread() override { 151 void SetUpOnMainThread() override {
153 gcm_service_ = static_cast<gcm::FakeGCMProfileService*>( 152 gcm_service_ = static_cast<gcm::FakeGCMProfileService*>(
154 gcm::GCMProfileServiceFactory::GetInstance()->SetTestingFactoryAndUse( 153 gcm::GCMProfileServiceFactory::GetInstance()->SetTestingFactoryAndUse(
155 GetBrowser()->profile(), &gcm::FakeGCMProfileService::Build)); 154 GetBrowser()->profile(), &gcm::FakeGCMProfileService::Build));
156 gcm_driver_ = static_cast<instance_id::FakeGCMDriverForInstanceID*>( 155 gcm_driver_ = static_cast<instance_id::FakeGCMDriverForInstanceID*>(
157 gcm_service_->driver()); 156 gcm_service_->driver());
158 157
(...skipping 2245 matching lines...) Expand 10 before | Expand all | Expand 10 after
2404 push_service()->SetUnsubscribeCallbackForTesting(run_loop.QuitClosure()); 2403 push_service()->SetUnsubscribeCallbackForTesting(run_loop.QuitClosure());
2405 ASSERT_TRUE(RunScript("unsubscribePush()", &script_result)); 2404 ASSERT_TRUE(RunScript("unsubscribePush()", &script_result));
2406 EXPECT_EQ("unsubscribe result: true", script_result); 2405 EXPECT_EQ("unsubscribe result: true", script_result);
2407 // Background mode is only guaranteed to have updated once the unsubscribe 2406 // Background mode is only guaranteed to have updated once the unsubscribe
2408 // callback for testing has been run (PushSubscription.unsubscribe() usually 2407 // callback for testing has been run (PushSubscription.unsubscribe() usually
2409 // resolves before that, in order to avoid blocking on network retries etc). 2408 // resolves before that, in order to avoid blocking on network retries etc).
2410 run_loop.Run(); 2409 run_loop.Run();
2411 ASSERT_FALSE(background_mode_manager->IsBackgroundModeActive()); 2410 ASSERT_FALSE(background_mode_manager->IsBackgroundModeActive());
2412 } 2411 }
2413 #endif // BUILDFLAG(ENABLE_BACKGROUND) && !defined(OS_CHROMEOS) 2412 #endif // BUILDFLAG(ENABLE_BACKGROUND) && !defined(OS_CHROMEOS)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698