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

Side by Side Diff: chrome/browser/ui/webui/chromeos/login/signin_userlist_unittest.cc

Issue 2937553002: Create Mojo Struct for user information used in login/lock screen. (Closed)
Patch Set: rebase Created 3 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
OLDNEW
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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 std::unique_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::mojom::AuthType> user_auth_type_map;
83 user_auth_type_map;
84 std::unique_ptr<MultiProfileUserController> controller_; 83 std::unique_ptr<MultiProfileUserController> controller_;
85 84
86 DISALLOW_COPY_AND_ASSIGN(SigninPrepareUserListTest); 85 DISALLOW_COPY_AND_ASSIGN(SigninPrepareUserListTest);
87 }; 86 };
88 87
89 TEST_F(SigninPrepareUserListTest, AlwaysKeepOwnerInList) { 88 TEST_F(SigninPrepareUserListTest, AlwaysKeepOwnerInList) {
90 EXPECT_LT(kMaxUsers, fake_user_manager_->GetUsers().size()); 89 EXPECT_LT(kMaxUsers, fake_user_manager_->GetUsers().size());
91 user_manager::UserList users_to_send = 90 user_manager::UserList users_to_send =
92 UserSelectionScreen::PrepareUserListForSending( 91 UserSelectionScreen::PrepareUserListForSending(
93 fake_user_manager_->GetUsers(), AccountId::FromUserEmail(kOwner), 92 fake_user_manager_->GetUsers(), AccountId::FromUserEmail(kOwner),
(...skipping 30 matching lines...) Expand all
124 users_to_send = UserSelectionScreen::PrepareUserListForSending( 123 users_to_send = UserSelectionScreen::PrepareUserListForSending(
125 fake_user_manager_->GetUsers(), AccountId::FromUserEmail(kOwner), 124 fake_user_manager_->GetUsers(), AccountId::FromUserEmail(kOwner),
126 false /* is signin to add */); 125 false /* is signin to add */);
127 126
128 EXPECT_EQ(kMaxUsers, users_to_send.size()); 127 EXPECT_EQ(kMaxUsers, users_to_send.size());
129 EXPECT_EQ("public0@gmail.com", 128 EXPECT_EQ("public0@gmail.com",
130 users_to_send.front()->GetAccountId().GetUserEmail()); 129 users_to_send.front()->GetAccountId().GetUserEmail());
131 } 130 }
132 131
133 } // namespace chromeos 132 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698