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

Unified Diff: components/gcm_driver/gcm_driver_desktop_unittest.cc

Issue 344033002: Remove GCMDriver::IsGCMClientReady (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 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 26e1573d584128157c912f1e597d9eded093952f..77ca103279eed67ea40fdc101ba926ea3ea5bd6c 100644
--- a/components/gcm_driver/gcm_driver_desktop_unittest.cc
+++ b/components/gcm_driver/gcm_driver_desktop_unittest.cc
@@ -326,12 +326,10 @@ TEST_F(GCMDriverTest, SignInAndSignOutOnGCMEnabled) {
// GCMClient should be started after sign-in.
SignIn(kTestAccountID1);
- EXPECT_TRUE(driver()->IsGCMClientReady());
EXPECT_EQ(FakeGCMClient::STARTED, GetGCMClient()->status());
// GCMClient should be checked out after sign-out.
SignOut();
- EXPECT_FALSE(driver()->IsGCMClientReady());
EXPECT_EQ(FakeGCMClient::CHECKED_OUT, GetGCMClient()->status());
}
@@ -345,12 +343,10 @@ TEST_F(GCMDriverTest, SignInAndSignOutOnGCMDisabled) {
// GCMClient should not be started after sign-in.
SignIn(kTestAccountID1);
- EXPECT_FALSE(driver()->IsGCMClientReady());
EXPECT_EQ(FakeGCMClient::UNINITIALIZED, GetGCMClient()->status());
// Check-out should still be performed after sign-out.
SignOut();
- EXPECT_FALSE(driver()->IsGCMClientReady());
EXPECT_EQ(FakeGCMClient::CHECKED_OUT, GetGCMClient()->status());
}
@@ -360,19 +356,16 @@ TEST_F(GCMDriverTest, SignOutAndThenSignIn) {
// GCMClient should be started after sign-in.
SignIn(kTestAccountID1);
- EXPECT_TRUE(driver()->IsGCMClientReady());
EXPECT_EQ(FakeGCMClient::STARTED, GetGCMClient()->status());
// GCMClient should be checked out after sign-out.
SignOut();
- EXPECT_FALSE(driver()->IsGCMClientReady());
EXPECT_EQ(FakeGCMClient::CHECKED_OUT, GetGCMClient()->status());
// Sign-in with a different account.
SignIn(kTestAccountID2);
// GCMClient should be started again.
- EXPECT_TRUE(driver()->IsGCMClientReady());
EXPECT_EQ(FakeGCMClient::STARTED, GetGCMClient()->status());
}
@@ -382,7 +375,6 @@ TEST_F(GCMDriverTest, DisableAndReenableGCM) {
SignIn(kTestAccountID1);
// GCMClient should be started.
- EXPECT_TRUE(driver()->IsGCMClientReady());
EXPECT_EQ(FakeGCMClient::STARTED, GetGCMClient()->status());
// Disables the GCM.
@@ -391,7 +383,6 @@ TEST_F(GCMDriverTest, DisableAndReenableGCM) {
PumpUILoop();
// GCMClient should be stopped.
- EXPECT_FALSE(driver()->IsGCMClientReady());
EXPECT_EQ(FakeGCMClient::STOPPED, GetGCMClient()->status());
// Enables the GCM.
@@ -400,7 +391,6 @@ TEST_F(GCMDriverTest, DisableAndReenableGCM) {
PumpUILoop();
// GCMClient should be started.
- EXPECT_TRUE(driver()->IsGCMClientReady());
EXPECT_EQ(FakeGCMClient::STARTED, GetGCMClient()->status());
// Disables the GCM.
@@ -409,14 +399,12 @@ TEST_F(GCMDriverTest, DisableAndReenableGCM) {
PumpUILoop();
// GCMClient should be stopped.
- EXPECT_FALSE(driver()->IsGCMClientReady());
EXPECT_EQ(FakeGCMClient::STOPPED, GetGCMClient()->status());
// Sign out.
SignOut();
// GCMClient should be checked out.
- EXPECT_FALSE(driver()->IsGCMClientReady());
EXPECT_EQ(FakeGCMClient::CHECKED_OUT, GetGCMClient()->status());
}
@@ -425,42 +413,36 @@ TEST_F(GCMDriverTest, StartOrStopGCMOnDemand) {
SignIn(kTestAccountID1);
// GCMClient is not started.
- EXPECT_FALSE(driver()->IsGCMClientReady());
EXPECT_EQ(FakeGCMClient::UNINITIALIZED, GetGCMClient()->status());
// GCMClient is started after an app handler has been added.
driver()->AddAppHandler(kTestAppID1, gcm_app_handler());
PumpIOLoop();
PumpUILoop();
- EXPECT_TRUE(driver()->IsGCMClientReady());
EXPECT_EQ(FakeGCMClient::STARTED, GetGCMClient()->status());
// Add another app handler.
driver()->AddAppHandler(kTestAppID2, gcm_app_handler());
PumpIOLoop();
PumpUILoop();
- EXPECT_TRUE(driver()->IsGCMClientReady());
EXPECT_EQ(FakeGCMClient::STARTED, GetGCMClient()->status());
// GCMClient remains active after one app handler is gone.
driver()->RemoveAppHandler(kTestAppID1);
PumpIOLoop();
PumpUILoop();
- EXPECT_TRUE(driver()->IsGCMClientReady());
EXPECT_EQ(FakeGCMClient::STARTED, GetGCMClient()->status());
// GCMClient should be stopped after the last app handler is gone.
driver()->RemoveAppHandler(kTestAppID2);
PumpIOLoop();
PumpUILoop();
- EXPECT_FALSE(driver()->IsGCMClientReady());
EXPECT_EQ(FakeGCMClient::STOPPED, GetGCMClient()->status());
// GCMClient is restarted after an app handler has been added.
driver()->AddAppHandler(kTestAppID2, gcm_app_handler());
PumpIOLoop();
PumpUILoop();
- EXPECT_TRUE(driver()->IsGCMClientReady());
EXPECT_EQ(FakeGCMClient::STARTED, GetGCMClient()->status());
}
« 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