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/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/files/scoped_temp_dir.h" | 8 #include "base/files/scoped_temp_dir.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 class TestMCSClient : public MCSClient { | 67 class TestMCSClient : public MCSClient { |
68 public: | 68 public: |
69 TestMCSClient(base::Clock* clock, | 69 TestMCSClient(base::Clock* clock, |
70 ConnectionFactory* connection_factory, | 70 ConnectionFactory* connection_factory, |
71 GCMStore* gcm_store, | 71 GCMStore* gcm_store, |
72 gcm::GCMStatsRecorder* recorder) | 72 gcm::GCMStatsRecorder* recorder) |
73 : MCSClient("", clock, connection_factory, gcm_store, recorder), | 73 : MCSClient("", clock, connection_factory, gcm_store, recorder), |
74 next_id_(0) { | 74 next_id_(0) { |
75 } | 75 } |
76 | 76 |
77 virtual std::string GetNextPersistentId() override { | 77 std::string GetNextPersistentId() override { |
78 return base::UintToString(++next_id_); | 78 return base::UintToString(++next_id_); |
79 } | 79 } |
80 | 80 |
81 private: | 81 private: |
82 uint32 next_id_; | 82 uint32 next_id_; |
83 }; | 83 }; |
84 | 84 |
85 class MCSClientTest : public testing::Test { | 85 class MCSClientTest : public testing::Test { |
86 public: | 86 public: |
87 MCSClientTest(); | 87 MCSClientTest(); |
(...skipping 773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
861 | 861 |
862 LoginClient(std::vector<std::string>()); | 862 LoginClient(std::vector<std::string>()); |
863 GetFakeHandler()->ExpectOutgoingMessage(message); | 863 GetFakeHandler()->ExpectOutgoingMessage(message); |
864 GetFakeHandler()->ExpectOutgoingMessage(message2); | 864 GetFakeHandler()->ExpectOutgoingMessage(message2); |
865 PumpLoop(); | 865 PumpLoop(); |
866 } | 866 } |
867 | 867 |
868 } // namespace | 868 } // namespace |
869 | 869 |
870 } // namespace gcm | 870 } // namespace gcm |
OLD | NEW |