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

Side by Side Diff: chrome/browser/ui/webui/settings/people_handler_unittest.cc

Issue 1960063003: Settings People Revamp: Update PeopleHandler to use JS lifecycle calls. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add AllowJavascript to unit test to allow it to pass Created 4 years, 7 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
« no previous file with comments | « chrome/browser/ui/webui/settings/people_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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/settings/people_handler.h" 5 #include "chrome/browser/ui/webui/settings/people_handler.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 ON_CALL(*mock_pss_, GetPassphraseType()).WillByDefault( 213 ON_CALL(*mock_pss_, GetPassphraseType()).WillByDefault(
214 Return(syncer::IMPLICIT_PASSPHRASE)); 214 Return(syncer::IMPLICIT_PASSPHRASE));
215 ON_CALL(*mock_pss_, GetExplicitPassphraseTime()).WillByDefault( 215 ON_CALL(*mock_pss_, GetExplicitPassphraseTime()).WillByDefault(
216 Return(base::Time())); 216 Return(base::Time()));
217 ON_CALL(*mock_pss_, GetRegisteredDataTypes()) 217 ON_CALL(*mock_pss_, GetRegisteredDataTypes())
218 .WillByDefault(Return(syncer::ModelTypeSet())); 218 .WillByDefault(Return(syncer::ModelTypeSet()));
219 219
220 mock_pss_->Initialize(); 220 mock_pss_->Initialize();
221 221
222 handler_.reset(new TestingPeopleHandler(&web_ui_, profile_)); 222 handler_.reset(new TestingPeopleHandler(&web_ui_, profile_));
223 handler_->AllowJavascript();
223 } 224 }
224 225
225 // Setup the expectations for calls made when displaying the config page. 226 // Setup the expectations for calls made when displaying the config page.
226 void SetDefaultExpectationsForConfigPage() { 227 void SetDefaultExpectationsForConfigPage() {
227 EXPECT_CALL(*mock_pss_, CanSyncStart()).WillRepeatedly(Return(true)); 228 EXPECT_CALL(*mock_pss_, CanSyncStart()).WillRepeatedly(Return(true));
228 EXPECT_CALL(*mock_pss_, GetRegisteredDataTypes()) 229 EXPECT_CALL(*mock_pss_, GetRegisteredDataTypes())
229 .WillRepeatedly(Return(GetAllTypes())); 230 .WillRepeatedly(Return(GetAllTypes()));
230 EXPECT_CALL(*mock_pss_, GetPreferredDataTypes()) 231 EXPECT_CALL(*mock_pss_, GetPreferredDataTypes())
231 .WillRepeatedly(Return(GetAllTypes())); 232 .WillRepeatedly(Return(GetAllTypes()));
232 EXPECT_CALL(*mock_pss_, GetActiveDataTypes()) 233 EXPECT_CALL(*mock_pss_, GetActiveDataTypes())
(...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after
951 SetupInitializedProfileSyncService(); 952 SetupInitializedProfileSyncService();
952 EXPECT_CALL(*mock_pss_, IsEncryptEverythingAllowed()) 953 EXPECT_CALL(*mock_pss_, IsEncryptEverythingAllowed())
953 .WillRepeatedly(Return(false)); 954 .WillRepeatedly(Return(false));
954 EXPECT_CALL(*mock_pss_, EnableEncryptEverything()).Times(0); 955 EXPECT_CALL(*mock_pss_, EnableEncryptEverything()).Times(0);
955 handler_->HandleSetEncryption(&list_args); 956 handler_->HandleSetEncryption(&list_args);
956 957
957 ExpectPageStatusResponse(PeopleHandler::kConfigurePageStatus); 958 ExpectPageStatusResponse(PeopleHandler::kConfigurePageStatus);
958 } 959 }
959 960
960 } // namespace settings 961 } // namespace settings
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/settings/people_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698