Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(205)

Side by Side Diff: sync/internal_api/sync_manager_impl_unittest.cc

Issue 73723006: Allow customization of HttpPostProviderFactory via ProfileSyncService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 710 matching lines...) Expand 10 before | Expand all | Expand 10 after
721 virtual const std::string GetResponseHeaderValue( 721 virtual const std::string GetResponseHeaderValue(
722 const std::string& name) const OVERRIDE { 722 const std::string& name) const OVERRIDE {
723 return std::string(); 723 return std::string();
724 } 724 }
725 virtual void Abort() OVERRIDE {} 725 virtual void Abort() OVERRIDE {}
726 }; 726 };
727 727
728 class TestHttpPostProviderFactory : public HttpPostProviderFactory { 728 class TestHttpPostProviderFactory : public HttpPostProviderFactory {
729 public: 729 public:
730 virtual ~TestHttpPostProviderFactory() {} 730 virtual ~TestHttpPostProviderFactory() {}
731 virtual void RegisterCancelationSignal(CancelationSignal* cancelation_signal)
732 OVERRIDE { }
731 virtual void Init(const std::string& user_agent) OVERRIDE { } 733 virtual void Init(const std::string& user_agent) OVERRIDE { }
732 virtual HttpPostProviderInterface* Create() OVERRIDE { 734 virtual HttpPostProviderInterface* Create() OVERRIDE {
733 return new TestHttpPostProviderInterface(); 735 return new TestHttpPostProviderInterface();
734 } 736 }
735 virtual void Destroy(HttpPostProviderInterface* http) OVERRIDE { 737 virtual void Destroy(HttpPostProviderInterface* http) OVERRIDE {
736 delete static_cast<TestHttpPostProviderInterface*>(http); 738 delete static_cast<TestHttpPostProviderInterface*>(http);
737 } 739 }
738 }; 740 };
739 741
740 class SyncManagerObserverMock : public SyncManager::Observer { 742 class SyncManagerObserverMock : public SyncManager::Observer {
(...skipping 2763 matching lines...) Expand 10 before | Expand all | Expand 10 after
3504 // SyncManagerInitInvalidStorageTest::GetFactory will return 3506 // SyncManagerInitInvalidStorageTest::GetFactory will return
3505 // DirectoryBackingStore that ensures that SyncManagerImpl::OpenDirectory fails. 3507 // DirectoryBackingStore that ensures that SyncManagerImpl::OpenDirectory fails.
3506 // SyncManagerImpl initialization is done in SyncManagerTest::SetUp. This test's 3508 // SyncManagerImpl initialization is done in SyncManagerTest::SetUp. This test's
3507 // task is to ensure that SyncManagerImpl reported initialization failure in 3509 // task is to ensure that SyncManagerImpl reported initialization failure in
3508 // OnInitializationComplete callback. 3510 // OnInitializationComplete callback.
3509 TEST_F(SyncManagerInitInvalidStorageTest, FailToOpenDatabase) { 3511 TEST_F(SyncManagerInitInvalidStorageTest, FailToOpenDatabase) {
3510 EXPECT_FALSE(initialization_succeeded_); 3512 EXPECT_FALSE(initialization_succeeded_);
3511 } 3513 }
3512 3514
3513 } // namespace 3515 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698