| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "components/invalidation/push_client_channel.h" | 8 #include "components/invalidation/push_client_channel.h" |
| 9 #include "jingle/notifier/listener/fake_push_client.h" | 9 #include "jingle/notifier/listener/fake_push_client.h" |
| 10 #include "jingle/notifier/listener/notification_defines.h" | 10 #include "jingle/notifier/listener/notification_defines.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 invalidation::NewPermanentCallback( | 27 invalidation::NewPermanentCallback( |
| 28 this, &PushClientChannelTest::OnIncomingMessage)); | 28 this, &PushClientChannelTest::OnIncomingMessage)); |
| 29 push_client_channel_.SetSystemResources(NULL); | 29 push_client_channel_.SetSystemResources(NULL); |
| 30 } | 30 } |
| 31 | 31 |
| 32 virtual ~PushClientChannelTest() { | 32 virtual ~PushClientChannelTest() { |
| 33 push_client_channel_.RemoveObserver(this); | 33 push_client_channel_.RemoveObserver(this); |
| 34 } | 34 } |
| 35 | 35 |
| 36 virtual void OnNetworkChannelStateChanged( | 36 virtual void OnNetworkChannelStateChanged( |
| 37 InvalidatorState invalidator_state) OVERRIDE { | 37 InvalidatorState invalidator_state) override { |
| 38 last_invalidator_state_ = invalidator_state; | 38 last_invalidator_state_ = invalidator_state; |
| 39 } | 39 } |
| 40 | 40 |
| 41 void OnIncomingMessage(std::string incoming_message) { | 41 void OnIncomingMessage(std::string incoming_message) { |
| 42 last_message_ = incoming_message; | 42 last_message_ = incoming_message; |
| 43 } | 43 } |
| 44 | 44 |
| 45 notifier::FakePushClient* fake_push_client_; | 45 notifier::FakePushClient* fake_push_client_; |
| 46 PushClientChannel push_client_channel_; | 46 PushClientChannel push_client_channel_; |
| 47 std::string last_message_; | 47 std::string last_message_; |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 &service_context, | 243 &service_context, |
| 244 &scheduling_hash)); | 244 &scheduling_hash)); |
| 245 EXPECT_EQ(kMessage, message); | 245 EXPECT_EQ(kMessage, message); |
| 246 EXPECT_EQ(kServiceContext, service_context); | 246 EXPECT_EQ(kServiceContext, service_context); |
| 247 EXPECT_EQ(kSchedulingHash, scheduling_hash); | 247 EXPECT_EQ(kSchedulingHash, scheduling_hash); |
| 248 } | 248 } |
| 249 } | 249 } |
| 250 | 250 |
| 251 } // namespace | 251 } // namespace |
| 252 } // namespace syncer | 252 } // namespace syncer |
| OLD | NEW |