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

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: Update to the code to prevent test crashes. 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
« no previous file with comments | « google_apis/gcm/engine/gcm_store_impl.cc ('k') | google_apis/gcm/tools/mcs_probe.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..ad4b024ee02bebd6c9e4a849e6c9fb7c5e5c3ff5 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,13 @@ TEST_F(GCMStoreImplTest, LastCheckinTime) {
PumpLoop();
base::Time last_checkin_time = base::Time::Now();
+ std::set<std::string> accounts;
+ accounts.insert("test_user1@gmail.com");
+ accounts.insert("test_user2@gmail.com");
- gcm_store->SetLastCheckinTime(
+ gcm_store->SetLastCheckinInfo(
last_checkin_time,
+ accounts,
base::Bind(&GCMStoreImplTest::UpdateCallback, base::Unretained(this)));
PumpLoop();
@@ -161,6 +165,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, load_result->last_checkin_accounts);
}
TEST_F(GCMStoreImplTest, GServicesSettings_ProtocolV2) {
« no previous file with comments | « google_apis/gcm/engine/gcm_store_impl.cc ('k') | google_apis/gcm/tools/mcs_probe.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698