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

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

Issue 121743002: Renaming RMQStore to GCMStore and breaking out its interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding a GCM_EXPORT directive to GCMStoreImpl Created 6 years, 11 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/mcs_client.cc ('k') | google_apis/gcm/engine/rmq_store.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/gcm/engine/mcs_client_unittest.cc
diff --git a/google_apis/gcm/engine/mcs_client_unittest.cc b/google_apis/gcm/engine/mcs_client_unittest.cc
index 2d2f000f45843091cf0ec4c375e3e5c1a58fce42..13e376c5410bda5a4eeb6aac8feb614e743990ef 100644
--- a/google_apis/gcm/engine/mcs_client_unittest.cc
+++ b/google_apis/gcm/engine/mcs_client_unittest.cc
@@ -13,6 +13,7 @@
#include "google_apis/gcm/base/mcs_util.h"
#include "google_apis/gcm/engine/fake_connection_factory.h"
#include "google_apis/gcm/engine/fake_connection_handler.h"
+#include "google_apis/gcm/engine/gcm_store_impl.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace gcm {
@@ -57,8 +58,8 @@ class TestMCSClient : public MCSClient {
public:
TestMCSClient(base::Clock* clock,
ConnectionFactory* connection_factory,
- RMQStore* rmq_store)
- : MCSClient(clock, connection_factory, rmq_store),
+ GCMStore* gcm_store)
+ : MCSClient(clock, connection_factory, gcm_store),
next_id_(0) {
}
@@ -107,7 +108,7 @@ class MCSClientTest : public testing::Test {
base::ScopedTempDir temp_directory_;
base::MessageLoop message_loop_;
scoped_ptr<base::RunLoop> run_loop_;
- scoped_ptr<RMQStore> rmq_store_;
+ scoped_ptr<GCMStore> gcm_store_;
FakeConnectionFactory connection_factory_;
scoped_ptr<TestMCSClient> mcs_client_;
@@ -135,23 +136,22 @@ MCSClientTest::MCSClientTest()
MCSClientTest::~MCSClientTest() {}
void MCSClientTest::BuildMCSClient() {
- rmq_store_.reset(new RMQStore(temp_directory_.path(),
- message_loop_.message_loop_proxy()));
+ gcm_store_.reset(new GCMStoreImpl(temp_directory_.path(),
+ message_loop_.message_loop_proxy()));
mcs_client_.reset(new TestMCSClient(&clock_,
&connection_factory_,
- rmq_store_.get()));
+ gcm_store_.get()));
}
void MCSClientTest::InitializeClient() {
- rmq_store_->Load(
- base::Bind(&MCSClient::Initialize,
- base::Unretained(mcs_client_.get()),
- base::Bind(&MCSClientTest::InitializationCallback,
- base::Unretained(this)),
- base::Bind(&MCSClientTest::MessageReceivedCallback,
- base::Unretained(this)),
- base::Bind(&MCSClientTest::MessageSentCallback,
- base::Unretained(this))));
+ gcm_store_->Load(base::Bind(
+ &MCSClient::Initialize,
+ base::Unretained(mcs_client_.get()),
+ base::Bind(&MCSClientTest::InitializationCallback,
+ base::Unretained(this)),
+ base::Bind(&MCSClientTest::MessageReceivedCallback,
+ base::Unretained(this)),
+ base::Bind(&MCSClientTest::MessageSentCallback, base::Unretained(this))));
run_loop_->Run();
run_loop_.reset(new base::RunLoop());
}
@@ -223,7 +223,7 @@ TEST_F(MCSClientTest, InitializeExisting) {
InitializeClient();
LoginClient(std::vector<std::string>());
- // Rebuild the client, to reload from the RMQ.
+ // Rebuild the client, to reload from the GCM store.
BuildMCSClient();
InitializeClient();
EXPECT_EQ(kAndroidId, restored_android_id());
« no previous file with comments | « google_apis/gcm/engine/mcs_client.cc ('k') | google_apis/gcm/engine/rmq_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698