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 "chrome/browser/sync/glue/sync_backend_host_impl.h" | 5 #include "chrome/browser/sync/glue/sync_backend_host_impl.h" |
6 | 6 |
7 #include <cstddef> | 7 #include <cstddef> |
8 | 8 |
9 #include "base/location.h" | 9 #include "base/location.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 } | 54 } |
55 | 55 |
56 void QuitMessageLoop() { | 56 void QuitMessageLoop() { |
57 base::MessageLoop::current()->Quit(); | 57 base::MessageLoop::current()->Quit(); |
58 } | 58 } |
59 | 59 |
60 class MockSyncFrontend : public SyncFrontend { | 60 class MockSyncFrontend : public SyncFrontend { |
61 public: | 61 public: |
62 virtual ~MockSyncFrontend() {} | 62 virtual ~MockSyncFrontend() {} |
63 | 63 |
64 MOCK_METHOD1(OnInvalidatorStateChange, | |
65 void(syncer::InvalidatorState)); | |
66 MOCK_METHOD1(OnIncomingInvalidation, | |
67 void(const syncer::ObjectIdInvalidationMap&)); | |
68 MOCK_METHOD3( | 64 MOCK_METHOD3( |
69 OnBackendInitialized, | 65 OnBackendInitialized, |
70 void(const syncer::WeakHandle<syncer::JsBackend>&, | 66 void(const syncer::WeakHandle<syncer::JsBackend>&, |
71 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>&, | 67 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>&, |
72 bool)); | 68 bool)); |
73 MOCK_METHOD0(OnSyncCycleCompleted, void()); | 69 MOCK_METHOD0(OnSyncCycleCompleted, void()); |
74 MOCK_METHOD1(OnConnectionStatusChange, | 70 MOCK_METHOD1(OnConnectionStatusChange, |
75 void(syncer::ConnectionStatus status)); | 71 void(syncer::ConnectionStatus status)); |
76 MOCK_METHOD0(OnStopSyncingPermanently, void()); | 72 MOCK_METHOD0(OnStopSyncingPermanently, void()); |
77 MOCK_METHOD0(OnClearServerDataSucceeded, void()); | 73 MOCK_METHOD0(OnClearServerDataSucceeded, void()); |
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
683 fake_manager_factory_->set_progress_marker_types(enabled_types_); | 679 fake_manager_factory_->set_progress_marker_types(enabled_types_); |
684 fake_manager_factory_->set_initial_sync_ended_types(enabled_types_); | 680 fake_manager_factory_->set_initial_sync_ended_types(enabled_types_); |
685 InitializeBackend(true); | 681 InitializeBackend(true); |
686 EXPECT_EQ(syncer::CONFIGURE_REASON_NEWLY_ENABLED_DATA_TYPE, | 682 EXPECT_EQ(syncer::CONFIGURE_REASON_NEWLY_ENABLED_DATA_TYPE, |
687 fake_manager_->GetAndResetConfigureReason()); | 683 fake_manager_->GetAndResetConfigureReason()); |
688 } | 684 } |
689 | 685 |
690 } // namespace | 686 } // namespace |
691 | 687 |
692 } // namespace browser_sync | 688 } // namespace browser_sync |
OLD | NEW |