OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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.h" | 5 #include "chrome/browser/sync/glue/sync_backend_host.h" |
6 | 6 |
7 #include <cstddef> | 7 #include <cstddef> |
8 | 8 |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
11 #include "chrome/browser/sync/engine/model_safe_worker.h" | 11 #include "chrome/browser/sync/engine/model_safe_worker.h" |
12 #include "chrome/browser/sync/protocol/sync_protocol_error.h" | 12 #include "chrome/browser/sync/protocol/sync_protocol_error.h" |
13 #include "chrome/browser/sync/sync_prefs.h" | 13 #include "chrome/browser/sync/sync_prefs.h" |
14 #include "chrome/browser/sync/syncable/model_type.h" | 14 #include "chrome/browser/sync/syncable/model_type.h" |
15 #include "chrome/test/base/test_url_request_context_getter.h" | 15 #include "chrome/test/base/test_url_request_context_getter.h" |
16 #include "chrome/test/base/testing_profile.h" | 16 #include "chrome/test/base/testing_profile.h" |
17 #include "chrome/test/base/test_url_request_context_getter.h" | 17 #include "chrome/test/base/test_url_request_context_getter.h" |
18 #include "content/test/test_browser_thread.h" | 18 #include "content/test/test_browser_thread.h" |
19 #include "content/test/test_url_fetcher_factory.h" | 19 #include "content/test/test_url_fetcher_factory.h" |
20 #include "googleurl/src/gurl.h" | 20 #include "googleurl/src/gurl.h" |
21 #include "testing/gmock/include/gmock/gmock.h" | 21 #include "testing/gmock/include/gmock/gmock.h" |
22 #include "testing/gtest/include/gtest/gtest.h" | 22 #include "testing/gtest/include/gtest/gtest.h" |
23 | 23 |
| 24 using content::BrowserThread; |
| 25 |
24 namespace browser_sync { | 26 namespace browser_sync { |
25 | 27 |
26 namespace { | 28 namespace { |
27 | 29 |
28 class MockSyncFrontend : public SyncFrontend { | 30 class MockSyncFrontend : public SyncFrontend { |
29 public: | 31 public: |
30 virtual ~MockSyncFrontend() {} | 32 virtual ~MockSyncFrontend() {} |
31 | 33 |
32 MOCK_METHOD2(OnBackendInitialized, void(const WeakHandle<JsBackend>&, bool)); | 34 MOCK_METHOD2(OnBackendInitialized, void(const WeakHandle<JsBackend>&, bool)); |
33 MOCK_METHOD0(OnSyncCycleCompleted, void()); | 35 MOCK_METHOD0(OnSyncCycleCompleted, void()); |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 syncable::ModelTypeSet(), | 102 syncable::ModelTypeSet(), |
101 credentials, | 103 credentials, |
102 true); | 104 true); |
103 backend.StopSyncingForShutdown(); | 105 backend.StopSyncingForShutdown(); |
104 backend.Shutdown(false); | 106 backend.Shutdown(false); |
105 } | 107 } |
106 | 108 |
107 // TODO(akalin): Write more SyncBackendHost unit tests. | 109 // TODO(akalin): Write more SyncBackendHost unit tests. |
108 | 110 |
109 } // namespace browser_sync | 111 } // namespace browser_sync |
OLD | NEW |