| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <stddef.h> | 5 #include <stddef.h> |
| 6 | 6 |
| 7 #include "ash/test/ash_test_base.h" | 7 #include "ash/test/ash_test_base.h" |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "chrome/browser/chromeos/login/screens/user_selection_screen.h" | 10 #include "chrome/browser/chromeos/login/screens/user_selection_screen.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 controller_.reset(); | 71 controller_.reset(); |
| 72 profile_manager_.reset(); | 72 profile_manager_.reset(); |
| 73 ash::test::AshTestBase::TearDown(); | 73 ash::test::AshTestBase::TearDown(); |
| 74 } | 74 } |
| 75 | 75 |
| 76 // MultiProfileUserControllerDelegate overrides: | 76 // MultiProfileUserControllerDelegate overrides: |
| 77 void OnUserNotAllowed(const std::string& user_email) override {} | 77 void OnUserNotAllowed(const std::string& user_email) override {} |
| 78 | 78 |
| 79 FakeChromeUserManager* fake_user_manager_; | 79 FakeChromeUserManager* fake_user_manager_; |
| 80 ScopedUserManagerEnabler user_manager_enabler_; | 80 ScopedUserManagerEnabler user_manager_enabler_; |
| 81 scoped_ptr<TestingProfileManager> profile_manager_; | 81 std::unique_ptr<TestingProfileManager> profile_manager_; |
| 82 std::map<std::string, proximity_auth::ScreenlockBridge::LockHandler::AuthType> | 82 std::map<std::string, proximity_auth::ScreenlockBridge::LockHandler::AuthType> |
| 83 user_auth_type_map; | 83 user_auth_type_map; |
| 84 scoped_ptr<MultiProfileUserController> controller_; | 84 std::unique_ptr<MultiProfileUserController> controller_; |
| 85 | 85 |
| 86 DISALLOW_COPY_AND_ASSIGN(SigninPrepareUserListTest); | 86 DISALLOW_COPY_AND_ASSIGN(SigninPrepareUserListTest); |
| 87 }; | 87 }; |
| 88 | 88 |
| 89 TEST_F(SigninPrepareUserListTest, AlwaysKeepOwnerInList) { | 89 TEST_F(SigninPrepareUserListTest, AlwaysKeepOwnerInList) { |
| 90 EXPECT_LT(kMaxUsers, fake_user_manager_->GetUsers().size()); | 90 EXPECT_LT(kMaxUsers, fake_user_manager_->GetUsers().size()); |
| 91 user_manager::UserList users_to_send = | 91 user_manager::UserList users_to_send = |
| 92 UserSelectionScreen::PrepareUserListForSending( | 92 UserSelectionScreen::PrepareUserListForSending( |
| 93 fake_user_manager_->GetUsers(), AccountId::FromUserEmail(kOwner), | 93 fake_user_manager_->GetUsers(), AccountId::FromUserEmail(kOwner), |
| 94 true /* is signin to add */); | 94 true /* is signin to add */); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 120 | 120 |
| 121 users_to_send = UserSelectionScreen::PrepareUserListForSending( | 121 users_to_send = UserSelectionScreen::PrepareUserListForSending( |
| 122 fake_user_manager_->GetUsers(), AccountId::FromUserEmail(kOwner), | 122 fake_user_manager_->GetUsers(), AccountId::FromUserEmail(kOwner), |
| 123 false /* is signin to add */); | 123 false /* is signin to add */); |
| 124 | 124 |
| 125 EXPECT_EQ(kMaxUsers, users_to_send.size()); | 125 EXPECT_EQ(kMaxUsers, users_to_send.size()); |
| 126 EXPECT_EQ("public0@gmail.com", users_to_send.front()->email()); | 126 EXPECT_EQ("public0@gmail.com", users_to_send.front()->email()); |
| 127 } | 127 } |
| 128 | 128 |
| 129 } // namespace chromeos | 129 } // namespace chromeos |
| OLD | NEW |