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

Side by Side Diff: chrome/browser/sync/test_profile_sync_service.cc

Issue 6413036: Another big out-of-lining of test code. Hits a lot of gmock objects (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: lei comments Created 9 years, 10 months 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/sync/test_profile_sync_service.h ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/test_profile_sync_service.h" 5 #include "chrome/browser/sync/test_profile_sync_service.h"
6 6
7 #include "chrome/browser/sync/abstract_profile_sync_service_test.h" 7 #include "chrome/browser/sync/abstract_profile_sync_service_test.h"
8 #include "chrome/browser/sync/engine/syncapi.h" 8 #include "chrome/browser/sync/engine/syncapi.h"
9 #include "chrome/browser/sync/glue/data_type_controller.h" 9 #include "chrome/browser/sync/glue/data_type_controller.h"
10 #include "chrome/browser/sync/glue/sync_backend_host.h" 10 #include "chrome/browser/sync/glue/sync_backend_host.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 testing::Invoke(this, 54 testing::Invoke(this,
55 &SyncBackendHostForProfileSyncTest:: 55 &SyncBackendHostForProfileSyncTest::
56 SimulateSyncCycleCompletedInitialSyncEnded)); 56 SimulateSyncCycleCompletedInitialSyncEnded));
57 57
58 EXPECT_CALL(*this, RequestPause()).Times(num_expected_pauses); 58 EXPECT_CALL(*this, RequestPause()).Times(num_expected_pauses);
59 EXPECT_CALL(*this, RequestResume()).Times(num_expected_resumes); 59 EXPECT_CALL(*this, RequestResume()).Times(num_expected_resumes);
60 EXPECT_CALL(*this, 60 EXPECT_CALL(*this,
61 RequestNudge()).Times(set_initial_sync_ended_on_init ? 0 : 1); 61 RequestNudge()).Times(set_initial_sync_ended_on_init ? 0 : 1);
62 } 62 }
63 63
64 SyncBackendHostForProfileSyncTest::~SyncBackendHostForProfileSyncTest() {}
65
64 void SyncBackendHostForProfileSyncTest::ConfigureDataTypes( 66 void SyncBackendHostForProfileSyncTest::ConfigureDataTypes(
65 const DataTypeController::TypeMap& data_type_controllers, 67 const DataTypeController::TypeMap& data_type_controllers,
66 const syncable::ModelTypeSet& types, 68 const syncable::ModelTypeSet& types,
67 CancelableTask* ready_task) { 69 CancelableTask* ready_task) {
68 SetAutofillMigrationState(syncable::MIGRATED); 70 SetAutofillMigrationState(syncable::MIGRATED);
69 SyncBackendHost::ConfigureDataTypes( 71 SyncBackendHost::ConfigureDataTypes(
70 data_type_controllers, types, ready_task); 72 data_type_controllers, types, ready_task);
71 } 73 }
72 74
73 void SyncBackendHostForProfileSyncTest:: 75 void SyncBackendHostForProfileSyncTest::
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 backend_.reset(new browser_sync::SyncBackendHostForProfileSyncTest( 271 backend_.reset(new browser_sync::SyncBackendHostForProfileSyncTest(
270 profile(), 272 profile(),
271 num_expected_resumes_, num_expected_pauses_, 273 num_expected_resumes_, num_expected_pauses_,
272 set_initial_sync_ended_on_init_, 274 set_initial_sync_ended_on_init_,
273 synchronous_backend_initialization_)); 275 synchronous_backend_initialization_));
274 } 276 }
275 277
276 std::string TestProfileSyncService::GetLsidForAuthBootstraping() { 278 std::string TestProfileSyncService::GetLsidForAuthBootstraping() {
277 return "foo"; 279 return "foo";
278 } 280 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/test_profile_sync_service.h ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698