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

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

Issue 227413010: Revert 262242 "Adding basic G-services handling" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 8 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 | « trunk/src/google_apis/gcm/engine/gcm_store_impl.cc ('k') | trunk/src/google_apis/gcm/gcm_client_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/google_apis/gcm/engine/gcm_store_impl_unittest.cc
===================================================================
--- trunk/src/google_apis/gcm/engine/gcm_store_impl_unittest.cc (revision 262265)
+++ trunk/src/google_apis/gcm/engine/gcm_store_impl_unittest.cc (working copy)
@@ -111,7 +111,6 @@
EXPECT_EQ(0U, load_result->device_security_token);
EXPECT_TRUE(load_result->incoming_messages.empty());
EXPECT_TRUE(load_result->outgoing_messages.empty());
- EXPECT_TRUE(load_result->gservices_settings.empty());
EXPECT_EQ(base::Time::FromInternalValue(0LL), load_result->last_checkin_time);
}
@@ -155,57 +154,10 @@
gcm_store->Load(base::Bind(
&GCMStoreImplTest::LoadCallback, base::Unretained(this), &load_result));
PumpLoop();
+
ASSERT_EQ(last_checkin_time, load_result->last_checkin_time);
}
-TEST_F(GCMStoreImplTest, GServicesSettings_ProtocolV2) {
- scoped_ptr<GCMStore> gcm_store(BuildGCMStore());
- scoped_ptr<GCMStore::LoadResult> load_result;
- gcm_store->Load(base::Bind(
- &GCMStoreImplTest::LoadCallback, base::Unretained(this), &load_result));
- PumpLoop();
-
- std::map<std::string, std::string> settings;
- settings["checkin_interval"] = "12345";
- settings["mcs_port"] = "438";
- settings["checkin_url"] = "http://checkin.google.com";
- std::string digest = "digest1";
-
- gcm_store->SetGServicesSettings(
- settings,
- digest,
- base::Bind(&GCMStoreImplTest::UpdateCallback, base::Unretained(this)));
- PumpLoop();
-
- gcm_store = BuildGCMStore().Pass();
- gcm_store->Load(base::Bind(
- &GCMStoreImplTest::LoadCallback, base::Unretained(this), &load_result));
- PumpLoop();
-
- ASSERT_EQ(settings, load_result->gservices_settings);
- ASSERT_EQ(digest, load_result->gservices_digest);
-
- // Remove some, and add some.
- settings.clear();
- settings["checkin_interval"] = "54321";
- settings["registration_url"] = "http://registration.google.com";
- digest = "digest2";
-
- gcm_store->SetGServicesSettings(
- settings,
- digest,
- base::Bind(&GCMStoreImplTest::UpdateCallback, base::Unretained(this)));
- PumpLoop();
-
- gcm_store = BuildGCMStore().Pass();
- gcm_store->Load(base::Bind(
- &GCMStoreImplTest::LoadCallback, base::Unretained(this), &load_result));
- PumpLoop();
-
- ASSERT_EQ(settings, load_result->gservices_settings);
- ASSERT_EQ(digest, load_result->gservices_digest);
-}
-
TEST_F(GCMStoreImplTest, Registrations) {
scoped_ptr<GCMStore> gcm_store(BuildGCMStore());
scoped_ptr<GCMStore::LoadResult> load_result;
« no previous file with comments | « trunk/src/google_apis/gcm/engine/gcm_store_impl.cc ('k') | trunk/src/google_apis/gcm/gcm_client_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698