| 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 <string> | 8 #include <string> |
| 8 #include <vector> | 9 #include <vector> |
| 9 | 10 |
| 10 #include "base/command_line.h" | 11 #include "base/command_line.h" |
| 11 #include "base/json/json_writer.h" | 12 #include "base/json/json_writer.h" |
| 12 #include "base/macros.h" | 13 #include "base/macros.h" |
| 13 #include "base/memory/scoped_ptr.h" | |
| 14 #include "base/stl_util.h" | 14 #include "base/stl_util.h" |
| 15 #include "base/values.h" | 15 #include "base/values.h" |
| 16 #include "build/build_config.h" | 16 #include "build/build_config.h" |
| 17 #include "chrome/browser/signin/fake_signin_manager_builder.h" | 17 #include "chrome/browser/signin/fake_signin_manager_builder.h" |
| 18 #include "chrome/browser/signin/signin_error_controller_factory.h" | 18 #include "chrome/browser/signin/signin_error_controller_factory.h" |
| 19 #include "chrome/browser/signin/signin_manager_factory.h" | 19 #include "chrome/browser/signin/signin_manager_factory.h" |
| 20 #include "chrome/browser/sync/profile_sync_service_factory.h" | 20 #include "chrome/browser/sync/profile_sync_service_factory.h" |
| 21 #include "chrome/browser/sync/profile_sync_test_util.h" | 21 #include "chrome/browser/sync/profile_sync_test_util.h" |
| 22 #include "chrome/browser/ui/webui/signin/login_ui_service.h" | 22 #include "chrome/browser/ui/webui/signin/login_ui_service.h" |
| 23 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" | 23 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 void NotifySyncListeners() { | 287 void NotifySyncListeners() { |
| 288 if (handler_->sync_startup_tracker_) | 288 if (handler_->sync_startup_tracker_) |
| 289 handler_->sync_startup_tracker_->OnStateChanged(); | 289 handler_->sync_startup_tracker_->OnStateChanged(); |
| 290 } | 290 } |
| 291 | 291 |
| 292 virtual std::string GetTestUser() { | 292 virtual std::string GetTestUser() { |
| 293 return std::string(kTestUser); | 293 return std::string(kTestUser); |
| 294 } | 294 } |
| 295 | 295 |
| 296 content::TestBrowserThreadBundle thread_bundle_; | 296 content::TestBrowserThreadBundle thread_bundle_; |
| 297 scoped_ptr<TestingProfileManager> profile_manager_; | 297 std::unique_ptr<TestingProfileManager> profile_manager_; |
| 298 Profile* profile_; | 298 Profile* profile_; |
| 299 ProfileSyncServiceMock* mock_pss_; | 299 ProfileSyncServiceMock* mock_pss_; |
| 300 GoogleServiceAuthError error_; | 300 GoogleServiceAuthError error_; |
| 301 SigninManagerBase* mock_signin_; | 301 SigninManagerBase* mock_signin_; |
| 302 content::TestWebUI web_ui_; | 302 content::TestWebUI web_ui_; |
| 303 scoped_ptr<TestingPeopleHandler> handler_; | 303 std::unique_ptr<TestingPeopleHandler> handler_; |
| 304 }; | 304 }; |
| 305 | 305 |
| 306 class PeopleHandlerFirstSigninTest : public PeopleHandlerTest { | 306 class PeopleHandlerFirstSigninTest : public PeopleHandlerTest { |
| 307 std::string GetTestUser() override { return std::string(); } | 307 std::string GetTestUser() override { return std::string(); } |
| 308 }; | 308 }; |
| 309 | 309 |
| 310 TEST_F(PeopleHandlerTest, Basic) { | 310 TEST_F(PeopleHandlerTest, Basic) { |
| 311 } | 311 } |
| 312 | 312 |
| 313 #if !defined(OS_CHROMEOS) | 313 #if !defined(OS_CHROMEOS) |
| (...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 974 EXPECT_CALL(*mock_pss_, EnableEncryptEverything()).Times(0); | 974 EXPECT_CALL(*mock_pss_, EnableEncryptEverything()).Times(0); |
| 975 EXPECT_CALL(*mock_pss_, OnUserChoseDatatypes(true, _)); | 975 EXPECT_CALL(*mock_pss_, OnUserChoseDatatypes(true, _)); |
| 976 handler_->HandleConfigure(&list_args); | 976 handler_->HandleConfigure(&list_args); |
| 977 | 977 |
| 978 // Ensure that we navigated to the "done" state since we don't need a | 978 // Ensure that we navigated to the "done" state since we don't need a |
| 979 // passphrase. | 979 // passphrase. |
| 980 ExpectDone(); | 980 ExpectDone(); |
| 981 } | 981 } |
| 982 | 982 |
| 983 } // namespace settings | 983 } // namespace settings |
| OLD | NEW |