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 "sync/internal_api/sync_backup_manager.h" | 5 #include "sync/internal_api/sync_backup_manager.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/files/scoped_temp_dir.h" | 9 #include "base/files/scoped_temp_dir.h" |
10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 EXPECT_TRUE(success); | 32 EXPECT_TRUE(success); |
33 } | 33 } |
34 | 34 |
35 class SyncBackupManagerTest : public syncer::SyncManager::Observer, | 35 class SyncBackupManagerTest : public syncer::SyncManager::Observer, |
36 public testing::Test { | 36 public testing::Test { |
37 public: | 37 public: |
38 MOCK_METHOD1(OnSyncCycleCompleted, | 38 MOCK_METHOD1(OnSyncCycleCompleted, |
39 void(const sessions::SyncSessionSnapshot&)); | 39 void(const sessions::SyncSessionSnapshot&)); |
40 MOCK_METHOD1(OnConnectionStatusChange, void(ConnectionStatus)); | 40 MOCK_METHOD1(OnConnectionStatusChange, void(ConnectionStatus)); |
41 MOCK_METHOD1(OnActionableError, void(const SyncProtocolError&)); | 41 MOCK_METHOD1(OnActionableError, void(const SyncProtocolError&)); |
42 MOCK_METHOD1(OnMigrationRequested, void(ModelTypeSet));; | 42 MOCK_METHOD1(OnMigrationRequested, void(ModelTypeSet)); |
43 MOCK_METHOD1(OnProtocolEvent, void(const ProtocolEvent&)); | 43 MOCK_METHOD1(OnProtocolEvent, void(const ProtocolEvent&)); |
44 MOCK_METHOD4(OnInitializationComplete, | 44 MOCK_METHOD4(OnInitializationComplete, |
45 void(const WeakHandle<JsBackend>&, | 45 void(const WeakHandle<JsBackend>&, |
46 const WeakHandle<DataTypeDebugInfoListener>&, | 46 const WeakHandle<DataTypeDebugInfoListener>&, |
47 bool, ModelTypeSet)); | 47 bool, ModelTypeSet)); |
48 | 48 |
49 protected: | 49 protected: |
50 void SetUp() override { | 50 void SetUp() override { |
51 CHECK(temp_dir_.CreateUniqueTempDir()); | 51 CHECK(temp_dir_.CreateUniqueTempDir()); |
52 } | 52 } |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 | 176 |
177 TEST_F(SyncBackupManagerTest, FailToInitialize) { | 177 TEST_F(SyncBackupManagerTest, FailToInitialize) { |
178 // Test graceful shutdown on initialization failure. | 178 // Test graceful shutdown on initialization failure. |
179 scoped_ptr<SyncBackupManager> manager(new SyncBackupManager); | 179 scoped_ptr<SyncBackupManager> manager(new SyncBackupManager); |
180 InitManager(manager.get(), InternalComponentsFactory::STORAGE_INVALID); | 180 InitManager(manager.get(), InternalComponentsFactory::STORAGE_INVALID); |
181 } | 181 } |
182 | 182 |
183 } // anonymous namespace | 183 } // anonymous namespace |
184 | 184 |
185 } // namespace syncer | 185 } // namespace syncer |
OLD | NEW |