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 // Unit tests for the SyncApi. Note that a lot of the underlying | 5 // Unit tests for the SyncApi. Note that a lot of the underlying |
6 // functionality is provided by the Syncable layer, which has its own | 6 // functionality is provided by the Syncable layer, which has its own |
7 // unit tests. We'll test SyncApi specific things in this harness. | 7 // unit tests. We'll test SyncApi specific things in this harness. |
8 | 8 |
9 #include <cstddef> | 9 #include <cstddef> |
10 #include <map> | 10 #include <map> |
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
641 MOCK_METHOD1(UpdateEnabledTypes, | 641 MOCK_METHOD1(UpdateEnabledTypes, |
642 void(const syncable::ModelTypeSet&)); | 642 void(const syncable::ModelTypeSet&)); |
643 MOCK_METHOD0(SendNotification, void()); | 643 MOCK_METHOD0(SendNotification, void()); |
644 }; | 644 }; |
645 | 645 |
646 class SyncManagerTest : public testing::Test, | 646 class SyncManagerTest : public testing::Test, |
647 public ModelSafeWorkerRegistrar { | 647 public ModelSafeWorkerRegistrar { |
648 protected: | 648 protected: |
649 SyncManagerTest() | 649 SyncManagerTest() |
650 : ui_thread_(BrowserThread::UI, &ui_loop_), | 650 : ui_thread_(BrowserThread::UI, &ui_loop_), |
| 651 sync_manager_("Test sync manager"), |
651 sync_notifier_observer_(NULL), | 652 sync_notifier_observer_(NULL), |
652 update_enabled_types_call_count_(0) {} | 653 update_enabled_types_call_count_(0) {} |
653 | 654 |
654 // Test implementation. | 655 // Test implementation. |
655 void SetUp() { | 656 void SetUp() { |
656 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); | 657 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); |
657 | 658 |
658 SyncCredentials credentials; | 659 SyncCredentials credentials; |
659 credentials.email = "foo@bar.com"; | 660 credentials.email = "foo@bar.com"; |
660 credentials.sync_token = "sometoken"; | 661 credentials.sync_token = "sometoken"; |
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1276 true /* is encrypted */)); | 1277 true /* is encrypted */)); |
1277 EXPECT_TRUE(syncable::VerifyDataTypeEncryption(trans.GetWrappedTrans(), | 1278 EXPECT_TRUE(syncable::VerifyDataTypeEncryption(trans.GetWrappedTrans(), |
1278 syncable::THEMES, | 1279 syncable::THEMES, |
1279 false /* not encrypted */)); | 1280 false /* not encrypted */)); |
1280 } | 1281 } |
1281 } | 1282 } |
1282 | 1283 |
1283 } // namespace | 1284 } // namespace |
1284 | 1285 |
1285 } // namespace browser_sync | 1286 } // namespace browser_sync |
OLD | NEW |