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

Unified Diff: components/gcm_driver/gcm_driver_desktop_unittest.cc

Issue 657703002: Revert of [GCM] Start GCMChannelStatusSyncer when GCM is disabled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « components/gcm_driver/gcm_driver_desktop.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/gcm_driver/gcm_driver_desktop_unittest.cc
diff --git a/components/gcm_driver/gcm_driver_desktop_unittest.cc b/components/gcm_driver/gcm_driver_desktop_unittest.cc
index efe833c47fc2e8a6df2c334cf64a00a45c71b315..57429577b0353e3a90797b808866ed2f7bdfd177 100644
--- a/components/gcm_driver/gcm_driver_desktop_unittest.cc
+++ b/components/gcm_driver/gcm_driver_desktop_unittest.cc
@@ -1091,7 +1091,7 @@
EXPECT_TRUE(driver()->IsStarted());
}
-TEST_F(GCMChannelStatusSyncerTest, DisableRestartAndEnable) {
+TEST_F(GCMChannelStatusSyncerTest, DisableAndRestart) {
// Create GCMDriver first. GCM is not started.
CreateDriver(FakeGCMClient::NO_DELAY_START);
EXPECT_FALSE(driver()->IsStarted());
@@ -1124,9 +1124,6 @@
ShutdownDriver();
CreateDriver(FakeGCMClient::NO_DELAY_START);
- // Remove delay such that the request could be executed immediately.
- syncer()->set_delay_removed_for_testing(true);
-
// GCM is still disabled.
EXPECT_FALSE(driver()->gcm_enabled());
EXPECT_FALSE(syncer()->gcm_enabled());
@@ -1136,15 +1133,6 @@
EXPECT_FALSE(driver()->gcm_enabled());
EXPECT_FALSE(syncer()->gcm_enabled());
EXPECT_FALSE(driver()->IsStarted());
-
- // Wait until the GCM channel status request gets triggered.
- PumpUILoop();
-
- // Complete the request that re-enables the GCM.
- CompleteGCMChannelStatusRequest(true, 0);
- EXPECT_TRUE(driver()->gcm_enabled());
- EXPECT_TRUE(syncer()->gcm_enabled());
- EXPECT_TRUE(driver()->IsStarted());
}
TEST_F(GCMChannelStatusSyncerTest, FirstTimePolling) {
« no previous file with comments | « components/gcm_driver/gcm_driver_desktop.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698