OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "google_apis/gcm/engine/mcs_client.h" | 5 #include "google_apis/gcm/engine/mcs_client.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 } | 198 } |
199 | 199 |
200 MCSClientTest::~MCSClientTest() {} | 200 MCSClientTest::~MCSClientTest() {} |
201 | 201 |
202 void MCSClientTest::SetUp() { | 202 void MCSClientTest::SetUp() { |
203 testing::Test::SetUp(); | 203 testing::Test::SetUp(); |
204 } | 204 } |
205 | 205 |
206 void MCSClientTest::BuildMCSClient() { | 206 void MCSClientTest::BuildMCSClient() { |
207 gcm_store_.reset( | 207 gcm_store_.reset( |
208 new GCMStoreImpl(temp_directory_.path(), message_loop_.task_runner(), | 208 new GCMStoreImpl(temp_directory_.GetPath(), message_loop_.task_runner(), |
209 base::WrapUnique<Encryptor>(new FakeEncryptor))); | 209 base::WrapUnique<Encryptor>(new FakeEncryptor))); |
210 mcs_client_.reset(new TestMCSClient(&clock_, | 210 mcs_client_.reset(new TestMCSClient(&clock_, |
211 &connection_factory_, | 211 &connection_factory_, |
212 gcm_store_.get(), | 212 gcm_store_.get(), |
213 &recorder_)); | 213 &recorder_)); |
214 } | 214 } |
215 | 215 |
216 void MCSClientTest::InitializeClient() { | 216 void MCSClientTest::InitializeClient() { |
217 gcm_store_->Load(GCMStore::CREATE_IF_MISSING, base::Bind( | 217 gcm_store_->Load(GCMStore::CREATE_IF_MISSING, base::Bind( |
218 &MCSClient::Initialize, | 218 &MCSClient::Initialize, |
(...skipping 961 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1180 GetFakeHandler()->ReceiveMessage(message); | 1180 GetFakeHandler()->ReceiveMessage(message); |
1181 WaitForMCSEvent(); | 1181 WaitForMCSEvent(); |
1182 PumpLoop(); | 1182 PumpLoop(); |
1183 | 1183 |
1184 EXPECT_TRUE(GetFakeHandler()->AllOutgoingMessagesReceived()); | 1184 EXPECT_TRUE(GetFakeHandler()->AllOutgoingMessagesReceived()); |
1185 } | 1185 } |
1186 | 1186 |
1187 } // namespace | 1187 } // namespace |
1188 | 1188 |
1189 } // namespace gcm | 1189 } // namespace gcm |
OLD | NEW |