OLD | NEW |
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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 const base::DictionaryValue* dictionary = nullptr; | 281 const base::DictionaryValue* dictionary = nullptr; |
282 EXPECT_TRUE(data1.arg2()->GetAsDictionary(&dictionary)); | 282 EXPECT_TRUE(data1.arg2()->GetAsDictionary(&dictionary)); |
283 return dictionary; | 283 return dictionary; |
284 } | 284 } |
285 | 285 |
286 // It's difficult to notify sync listeners when using a ProfileSyncServiceMock | 286 // It's difficult to notify sync listeners when using a ProfileSyncServiceMock |
287 // so this helper routine dispatches an OnStateChanged() notification to the | 287 // so this helper routine dispatches an OnStateChanged() notification to the |
288 // SyncStartupTracker. | 288 // SyncStartupTracker. |
289 void NotifySyncListeners() { | 289 void NotifySyncListeners() { |
290 if (handler_->sync_startup_tracker_) | 290 if (handler_->sync_startup_tracker_) |
291 handler_->sync_startup_tracker_->OnStateChanged(); | 291 handler_->sync_startup_tracker_->OnStateChanged(mock_pss_); |
292 } | 292 } |
293 | 293 |
294 virtual std::string GetTestUser() { | 294 virtual std::string GetTestUser() { |
295 return std::string(kTestUser); | 295 return std::string(kTestUser); |
296 } | 296 } |
297 | 297 |
298 content::TestBrowserThreadBundle thread_bundle_; | 298 content::TestBrowserThreadBundle thread_bundle_; |
299 std::unique_ptr<TestingProfileManager> profile_manager_; | 299 std::unique_ptr<TestingProfileManager> profile_manager_; |
300 Profile* profile_; | 300 Profile* profile_; |
301 ProfileSyncServiceMock* mock_pss_; | 301 ProfileSyncServiceMock* mock_pss_; |
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
901 SetupInitializedProfileSyncService(); | 901 SetupInitializedProfileSyncService(); |
902 EXPECT_CALL(*mock_pss_, IsEncryptEverythingAllowed()) | 902 EXPECT_CALL(*mock_pss_, IsEncryptEverythingAllowed()) |
903 .WillRepeatedly(Return(false)); | 903 .WillRepeatedly(Return(false)); |
904 EXPECT_CALL(*mock_pss_, EnableEncryptEverything()).Times(0); | 904 EXPECT_CALL(*mock_pss_, EnableEncryptEverything()).Times(0); |
905 handler_->HandleSetEncryption(&list_args); | 905 handler_->HandleSetEncryption(&list_args); |
906 | 906 |
907 ExpectPageStatusResponse(PeopleHandler::kConfigurePageStatus); | 907 ExpectPageStatusResponse(PeopleHandler::kConfigurePageStatus); |
908 } | 908 } |
909 | 909 |
910 } // namespace settings | 910 } // namespace settings |
OLD | NEW |