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

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

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698