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 "base/files/scoped_temp_dir.h" | 7 #include "base/files/scoped_temp_dir.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 OSCrypt::UseMockKeychain(true); | 149 OSCrypt::UseMockKeychain(true); |
150 #endif | 150 #endif |
151 | 151 |
152 // Advance the clock to a non-zero time. | 152 // Advance the clock to a non-zero time. |
153 clock_.Advance(base::TimeDelta::FromSeconds(1)); | 153 clock_.Advance(base::TimeDelta::FromSeconds(1)); |
154 } | 154 } |
155 | 155 |
156 MCSClientTest::~MCSClientTest() {} | 156 MCSClientTest::~MCSClientTest() {} |
157 | 157 |
158 void MCSClientTest::BuildMCSClient() { | 158 void MCSClientTest::BuildMCSClient() { |
159 gcm_store_.reset(new GCMStoreImpl(temp_directory_.path(), | 159 gcm_store_.reset(new GCMStoreImpl(true, |
| 160 temp_directory_.path(), |
160 message_loop_.message_loop_proxy())); | 161 message_loop_.message_loop_proxy())); |
161 mcs_client_.reset(new TestMCSClient(&clock_, | 162 mcs_client_.reset(new TestMCSClient(&clock_, |
162 &connection_factory_, | 163 &connection_factory_, |
163 gcm_store_.get())); | 164 gcm_store_.get())); |
164 } | 165 } |
165 | 166 |
166 void MCSClientTest::InitializeClient() { | 167 void MCSClientTest::InitializeClient() { |
167 gcm_store_->Load(base::Bind( | 168 gcm_store_->Load(base::Bind( |
168 &MCSClient::Initialize, | 169 &MCSClient::Initialize, |
169 base::Unretained(mcs_client_.get()), | 170 base::Unretained(mcs_client_.get()), |
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
781 | 782 |
782 LoginClient(std::vector<std::string>()); | 783 LoginClient(std::vector<std::string>()); |
783 GetFakeHandler()->ExpectOutgoingMessage(message); | 784 GetFakeHandler()->ExpectOutgoingMessage(message); |
784 GetFakeHandler()->ExpectOutgoingMessage(message2); | 785 GetFakeHandler()->ExpectOutgoingMessage(message2); |
785 PumpLoop(); | 786 PumpLoop(); |
786 } | 787 } |
787 | 788 |
788 } // namespace | 789 } // namespace |
789 | 790 |
790 } // namespace gcm | 791 } // namespace gcm |
OLD | NEW |