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

Side by Side Diff: chrome/browser/chromeos/login/existing_user_controller_browsertest.cc

Issue 608283003: Remove retail mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <string> 5 #include <string>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 .WillRepeatedly(Return(true)); 172 .WillRepeatedly(Return(true));
173 EXPECT_CALL(*mock_user_manager_, IsKnownUser(kNewUsername)) 173 EXPECT_CALL(*mock_user_manager_, IsKnownUser(kNewUsername))
174 .Times(AnyNumber()) 174 .Times(AnyNumber())
175 .WillRepeatedly(Return(false)); 175 .WillRepeatedly(Return(false));
176 EXPECT_CALL(*mock_user_manager_, IsUserLoggedIn()) 176 EXPECT_CALL(*mock_user_manager_, IsUserLoggedIn())
177 .Times(AnyNumber()) 177 .Times(AnyNumber())
178 .WillRepeatedly(Return(false)); 178 .WillRepeatedly(Return(false));
179 EXPECT_CALL(*mock_user_manager_, IsLoggedInAsGuest()) 179 EXPECT_CALL(*mock_user_manager_, IsLoggedInAsGuest())
180 .Times(AnyNumber()) 180 .Times(AnyNumber())
181 .WillRepeatedly(Return(false)); 181 .WillRepeatedly(Return(false));
182 EXPECT_CALL(*mock_user_manager_, IsLoggedInAsDemoUser())
183 .Times(AnyNumber())
184 .WillRepeatedly(Return(false));
185 EXPECT_CALL(*mock_user_manager_, IsLoggedInAsPublicAccount()) 182 EXPECT_CALL(*mock_user_manager_, IsLoggedInAsPublicAccount())
186 .Times(AnyNumber()) 183 .Times(AnyNumber())
187 .WillRepeatedly(Return(false)); 184 .WillRepeatedly(Return(false));
188 EXPECT_CALL(*mock_user_manager_, IsSessionStarted()) 185 EXPECT_CALL(*mock_user_manager_, IsSessionStarted())
189 .Times(AnyNumber()) 186 .Times(AnyNumber())
190 .WillRepeatedly(Return(false)); 187 .WillRepeatedly(Return(false));
191 EXPECT_CALL(*mock_user_manager_, IsCurrentUserNew()) 188 EXPECT_CALL(*mock_user_manager_, IsCurrentUserNew())
192 .Times(AnyNumber()) 189 .Times(AnyNumber())
193 .WillRepeatedly(Return(false)); 190 .WillRepeatedly(Return(false));
194 EXPECT_CALL(*mock_user_manager_, Shutdown()) 191 EXPECT_CALL(*mock_user_manager_, Shutdown())
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 } 340 }
344 341
345 IN_PROC_BROWSER_TEST_F(ExistingUserControllerUntrustedTest, 342 IN_PROC_BROWSER_TEST_F(ExistingUserControllerUntrustedTest,
346 GuestLoginForbidden) { 343 GuestLoginForbidden) {
347 existing_user_controller()->Login( 344 existing_user_controller()->Login(
348 UserContext(user_manager::USER_TYPE_GUEST, std::string()), 345 UserContext(user_manager::USER_TYPE_GUEST, std::string()),
349 SigninSpecifics()); 346 SigninSpecifics());
350 } 347 }
351 348
352 IN_PROC_BROWSER_TEST_F(ExistingUserControllerUntrustedTest, 349 IN_PROC_BROWSER_TEST_F(ExistingUserControllerUntrustedTest,
353 RetailModeLoginForbidden) {
354 existing_user_controller()->Login(
355 UserContext(user_manager::USER_TYPE_RETAIL_MODE,
356 chromeos::login::kRetailModeUserName),
357 SigninSpecifics());
358 }
359
360 IN_PROC_BROWSER_TEST_F(ExistingUserControllerUntrustedTest,
361 SupervisedUserLoginForbidden) { 350 SupervisedUserLoginForbidden) {
362 UserContext user_context(kSupervisedUserID); 351 UserContext user_context(kSupervisedUserID);
363 user_context.SetKey(Key(kPassword)); 352 user_context.SetKey(Key(kPassword));
364 user_context.SetUserIDHash(kUsername); 353 user_context.SetUserIDHash(kUsername);
365 existing_user_controller()->Login(user_context, SigninSpecifics()); 354 existing_user_controller()->Login(user_context, SigninSpecifics());
366 } 355 }
367 356
368 IN_PROC_BROWSER_TEST_F(ExistingUserControllerUntrustedTest, 357 IN_PROC_BROWSER_TEST_F(ExistingUserControllerUntrustedTest,
369 SupervisedUserCreationForbidden) { 358 SupervisedUserCreationForbidden) {
370 MockBaseScreenDelegate mock_base_screen_delegate; 359 MockBaseScreenDelegate mock_base_screen_delegate;
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 // First run propagates public accounts and stores them in Local State. 747 // First run propagates public accounts and stores them in Local State.
759 } 748 }
760 749
761 // See http://crbug.com/393704; flaky. 750 // See http://crbug.com/393704; flaky.
762 IN_PROC_BROWSER_TEST_F(ExistingUserControllerPublicSessionTest, 751 IN_PROC_BROWSER_TEST_F(ExistingUserControllerPublicSessionTest,
763 DISABLED_TestLoadingPublicUsersFromLocalState) { 752 DISABLED_TestLoadingPublicUsersFromLocalState) {
764 // Second run loads list of public accounts from Local State. 753 // Second run loads list of public accounts from Local State.
765 } 754 }
766 755
767 } // namespace chromeos 756 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/existing_user_controller.cc ('k') | chrome/browser/chromeos/login/lock/screen_locker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698