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

Unified Diff: google_apis/gcm/engine/gcm_store_impl_unittest.cc

Issue 378643002: [GCM] Check-in with signed in accounts associates device to user (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixing compilation issue on android Created 6 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 side-by-side diff with in-line comments
Download patch
Index: google_apis/gcm/engine/gcm_store_impl_unittest.cc
diff --git a/google_apis/gcm/engine/gcm_store_impl_unittest.cc b/google_apis/gcm/engine/gcm_store_impl_unittest.cc
index 7b9c89365291e1b8275a08953b35294ce59e093e..f203ccbe630bf35c02c1d095b9b0b13ab1820752 100644
--- a/google_apis/gcm/engine/gcm_store_impl_unittest.cc
+++ b/google_apis/gcm/engine/gcm_store_impl_unittest.cc
@@ -142,7 +142,7 @@ TEST_F(GCMStoreImplTest, DeviceCredentials) {
ASSERT_EQ(kDeviceToken, load_result->device_security_token);
}
-TEST_F(GCMStoreImplTest, LastCheckinTime) {
+TEST_F(GCMStoreImplTest, LastCheckinInfo) {
scoped_ptr<GCMStore> gcm_store(BuildGCMStore());
scoped_ptr<GCMStore::LoadResult> load_result;
gcm_store->Load(base::Bind(
@@ -150,9 +150,11 @@ TEST_F(GCMStoreImplTest, LastCheckinTime) {
PumpLoop();
base::Time last_checkin_time = base::Time::Now();
+ uint64 accounts_count = 2; // Anything above 0 does the job.
- gcm_store->SetLastCheckinTime(
+ gcm_store->SetLastCheckinInfo(
last_checkin_time,
+ accounts_count,
base::Bind(&GCMStoreImplTest::UpdateCallback, base::Unretained(this)));
PumpLoop();
@@ -161,6 +163,7 @@ TEST_F(GCMStoreImplTest, LastCheckinTime) {
&GCMStoreImplTest::LoadCallback, base::Unretained(this), &load_result));
PumpLoop();
ASSERT_EQ(last_checkin_time, load_result->last_checkin_time);
+ ASSERT_EQ(accounts_count, load_result->accounts_count);
}
TEST_F(GCMStoreImplTest, GServicesSettings_ProtocolV2) {

Powered by Google App Engine
This is Rietveld 408576698