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

Side by Side Diff: chrome/browser/ui/webui/sync_setup_handler_unittest.cc

Issue 16105012: Unrevert "[Sync] Split GetPreferredTypes into GetActiveType..."" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adjust mock Created 7 years, 6 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/ui/webui/ntp/foreign_session_handler.cc ('k') | no next file » | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #include "chrome/browser/ui/webui/sync_setup_handler.h" 5 #include "chrome/browser/ui/webui/sync_setup_handler.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/json/json_writer.h" 10 #include "base/json/json_writer.h"
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 #endif 371 #endif
372 handler_.reset(new TestingSyncSetupHandler(&web_ui_, profile_.get())); 372 handler_.reset(new TestingSyncSetupHandler(&web_ui_, profile_.get()));
373 } 373 }
374 374
375 // Setup the expectations for calls made when displaying the config page. 375 // Setup the expectations for calls made when displaying the config page.
376 void SetDefaultExpectationsForConfigPage() { 376 void SetDefaultExpectationsForConfigPage() {
377 EXPECT_CALL(*mock_pss_, GetRegisteredDataTypes()). 377 EXPECT_CALL(*mock_pss_, GetRegisteredDataTypes()).
378 WillRepeatedly(Return(GetAllTypes())); 378 WillRepeatedly(Return(GetAllTypes()));
379 EXPECT_CALL(*mock_pss_, GetPreferredDataTypes()). 379 EXPECT_CALL(*mock_pss_, GetPreferredDataTypes()).
380 WillRepeatedly(Return(GetAllTypes())); 380 WillRepeatedly(Return(GetAllTypes()));
381 EXPECT_CALL(*mock_pss_, GetActiveDataTypes()).
382 WillRepeatedly(Return(GetAllTypes()));
381 EXPECT_CALL(*mock_pss_, EncryptEverythingEnabled()). 383 EXPECT_CALL(*mock_pss_, EncryptEverythingEnabled()).
382 WillRepeatedly(Return(false)); 384 WillRepeatedly(Return(false));
383 } 385 }
384 386
385 void SetupInitializedProfileSyncService() { 387 void SetupInitializedProfileSyncService() {
386 // An initialized ProfileSyncService will have already completed sync setup 388 // An initialized ProfileSyncService will have already completed sync setup
387 // and will have an initialized sync backend. 389 // and will have an initialized sync backend.
388 if (!mock_signin_->IsInitialized()) { 390 if (!mock_signin_->IsInitialized()) {
389 profile_->GetPrefs()->SetString( 391 profile_->GetPrefs()->SetString(
390 prefs::kGoogleServicesUsername, kTestUser); 392 prefs::kGoogleServicesUsername, kTestUser);
(...skipping 959 matching lines...) Expand 10 before | Expand all | Expand 10 after
1350 ExpectConfig(); 1352 ExpectConfig();
1351 const TestWebUI::CallData& data = web_ui_.call_data()[0]; 1353 const TestWebUI::CallData& data = web_ui_.call_data()[0];
1352 DictionaryValue* dictionary; 1354 DictionaryValue* dictionary;
1353 ASSERT_TRUE(data.arg2->GetAsDictionary(&dictionary)); 1355 ASSERT_TRUE(data.arg2->GetAsDictionary(&dictionary));
1354 CheckBool(dictionary, "encryptAllData", true); 1356 CheckBool(dictionary, "encryptAllData", true);
1355 } 1357 }
1356 1358
1357 INSTANTIATE_TEST_CASE_P(SyncSetupHandlerTestWithParam, 1359 INSTANTIATE_TEST_CASE_P(SyncSetupHandlerTestWithParam,
1358 SyncSetupHandlerTest, 1360 SyncSetupHandlerTest,
1359 Values(true, false)); 1361 Values(true, false));
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/ntp/foreign_session_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698