OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "sync/notifier/sync_system_resources.h" | 5 #include "components/invalidation/sync_system_resources.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "base/message_loop/message_loop.h" | 12 #include "base/message_loop/message_loop.h" |
13 | 13 |
| 14 #include "components/invalidation/push_client_channel.h" |
| 15 #include "components/invalidation/state_writer.h" |
14 #include "google/cacheinvalidation/include/types.h" | 16 #include "google/cacheinvalidation/include/types.h" |
15 #include "jingle/notifier/listener/fake_push_client.h" | 17 #include "jingle/notifier/listener/fake_push_client.h" |
16 #include "sync/notifier/push_client_channel.h" | |
17 #include "sync/notifier/state_writer.h" | |
18 #include "testing/gmock/include/gmock/gmock.h" | 18 #include "testing/gmock/include/gmock/gmock.h" |
19 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
20 | 20 |
21 namespace syncer { | 21 namespace syncer { |
22 namespace { | 22 namespace { |
23 | 23 |
24 using ::testing::_; | 24 using ::testing::_; |
25 using ::testing::SaveArg; | 25 using ::testing::SaveArg; |
26 | 26 |
27 class MockStateWriter : public StateWriter { | 27 class MockStateWriter : public StateWriter { |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 network_channel_.NotifyStateChange(INVALIDATIONS_ENABLED); | 240 network_channel_.NotifyStateChange(INVALIDATIONS_ENABLED); |
241 EXPECT_EQ(INVALIDATIONS_ENABLED, last_invalidator_state_); | 241 EXPECT_EQ(INVALIDATIONS_ENABLED, last_invalidator_state_); |
242 EXPECT_TRUE(connected_); | 242 EXPECT_TRUE(connected_); |
243 network_channel_.NotifyStateChange(INVALIDATION_CREDENTIALS_REJECTED); | 243 network_channel_.NotifyStateChange(INVALIDATION_CREDENTIALS_REJECTED); |
244 EXPECT_EQ(INVALIDATION_CREDENTIALS_REJECTED, last_invalidator_state_); | 244 EXPECT_EQ(INVALIDATION_CREDENTIALS_REJECTED, last_invalidator_state_); |
245 EXPECT_FALSE(connected_); | 245 EXPECT_FALSE(connected_); |
246 } | 246 } |
247 | 247 |
248 } // namespace | 248 } // namespace |
249 } // namespace syncer | 249 } // namespace syncer |
OLD | NEW |