OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 // 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 783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
794 const std::string GetResponseHeaderValue( | 794 const std::string GetResponseHeaderValue( |
795 const std::string& name) const override { | 795 const std::string& name) const override { |
796 return std::string(); | 796 return std::string(); |
797 } | 797 } |
798 void Abort() override {} | 798 void Abort() override {} |
799 }; | 799 }; |
800 | 800 |
801 class TestHttpPostProviderFactory : public HttpPostProviderFactory { | 801 class TestHttpPostProviderFactory : public HttpPostProviderFactory { |
802 public: | 802 public: |
803 ~TestHttpPostProviderFactory() override {} | 803 ~TestHttpPostProviderFactory() override {} |
804 void Init(const std::string& user_agent) override {} | 804 void Init(const std::string& user_agent, |
| 805 const BindToTrackerCallback& bind_to_tracker_callback) override {} |
805 HttpPostProviderInterface* Create() override { | 806 HttpPostProviderInterface* Create() override { |
806 return new TestHttpPostProviderInterface(); | 807 return new TestHttpPostProviderInterface(); |
807 } | 808 } |
808 void Destroy(HttpPostProviderInterface* http) override { | 809 void Destroy(HttpPostProviderInterface* http) override { |
809 delete static_cast<TestHttpPostProviderInterface*>(http); | 810 delete static_cast<TestHttpPostProviderInterface*>(http); |
810 } | 811 } |
811 }; | 812 }; |
812 | 813 |
813 class SyncManagerObserverMock : public SyncManager::Observer { | 814 class SyncManagerObserverMock : public SyncManager::Observer { |
814 public: | 815 public: |
(...skipping 2540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3355 // SyncManagerInitInvalidStorageTest::GetFactory will return | 3356 // SyncManagerInitInvalidStorageTest::GetFactory will return |
3356 // DirectoryBackingStore that ensures that SyncManagerImpl::OpenDirectory fails. | 3357 // DirectoryBackingStore that ensures that SyncManagerImpl::OpenDirectory fails. |
3357 // SyncManagerImpl initialization is done in SyncManagerTest::SetUp. This test's | 3358 // SyncManagerImpl initialization is done in SyncManagerTest::SetUp. This test's |
3358 // task is to ensure that SyncManagerImpl reported initialization failure in | 3359 // task is to ensure that SyncManagerImpl reported initialization failure in |
3359 // OnInitializationComplete callback. | 3360 // OnInitializationComplete callback. |
3360 TEST_F(SyncManagerInitInvalidStorageTest, FailToOpenDatabase) { | 3361 TEST_F(SyncManagerInitInvalidStorageTest, FailToOpenDatabase) { |
3361 EXPECT_FALSE(initialization_succeeded_); | 3362 EXPECT_FALSE(initialization_succeeded_); |
3362 } | 3363 } |
3363 | 3364 |
3364 } // namespace syncer | 3365 } // namespace syncer |
OLD | NEW |