Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 <vector> | 5 #include <vector> |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 96 | 96 |
| 97 virtual void SetUpInProcessBrowserTestFixture() override { | 97 virtual void SetUpInProcessBrowserTestFixture() override { |
| 98 SetUpSessionManager(); | 98 SetUpSessionManager(); |
| 99 | 99 |
| 100 DevicePolicyCrosBrowserTest::SetUpInProcessBrowserTestFixture(); | 100 DevicePolicyCrosBrowserTest::SetUpInProcessBrowserTestFixture(); |
| 101 | 101 |
| 102 mock_login_utils_ = new MockLoginUtils(); | 102 mock_login_utils_ = new MockLoginUtils(); |
| 103 LoginUtils::Set(mock_login_utils_); | 103 LoginUtils::Set(mock_login_utils_); |
| 104 EXPECT_CALL(*mock_login_utils_, DelegateDeleted(_)) | 104 EXPECT_CALL(*mock_login_utils_, DelegateDeleted(_)) |
| 105 .Times(1); | 105 .Times(1); |
| 106 EXPECT_CALL(*mock_login_utils_, RestartToApplyPerSessionFlagsIfNeed(_, _)) | |
|
ygorshenin1
2014/10/13 12:20:50
Why this change is needed?
Nikita (slow)
2014/10/13 12:22:36
This method call has been added a while ago and no
| |
| 107 .Times(AnyNumber()) | |
| 108 .WillRepeatedly(Return(false)); | |
| 106 | 109 |
| 107 mock_login_display_host_.reset(new MockLoginDisplayHost()); | 110 mock_login_display_host_.reset(new MockLoginDisplayHost()); |
| 108 mock_login_display_ = new MockLoginDisplay(); | 111 mock_login_display_ = new MockLoginDisplay(); |
| 109 SetUpLoginDisplay(); | 112 SetUpLoginDisplay(); |
| 110 } | 113 } |
| 111 | 114 |
| 112 virtual void SetUpSessionManager() { | 115 virtual void SetUpSessionManager() { |
| 113 } | 116 } |
| 114 | 117 |
| 115 virtual void SetUpLoginDisplay() { | 118 virtual void SetUpLoginDisplay() { |
| (...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 592 | 595 |
| 593 IN_PROC_BROWSER_TEST_F(ExistingUserControllerPublicSessionTest, | 596 IN_PROC_BROWSER_TEST_F(ExistingUserControllerPublicSessionTest, |
| 594 GuestModeLoginStopsAutoLogin) { | 597 GuestModeLoginStopsAutoLogin) { |
| 595 EXPECT_CALL(*mock_login_display_, SetUIEnabled(false)) | 598 EXPECT_CALL(*mock_login_display_, SetUIEnabled(false)) |
| 596 .Times(1); | 599 .Times(1); |
| 597 UserContext user_context(kUsername); | 600 UserContext user_context(kUsername); |
| 598 user_context.SetKey(Key(kPassword)); | 601 user_context.SetKey(Key(kPassword)); |
| 599 EXPECT_CALL(*mock_login_utils_, CreateAuthenticator(_)) | 602 EXPECT_CALL(*mock_login_utils_, CreateAuthenticator(_)) |
| 600 .Times(1) | 603 .Times(1) |
| 601 .WillOnce(WithArg<0>(CreateAuthenticator(user_context))); | 604 .WillOnce(WithArg<0>(CreateAuthenticator(user_context))); |
| 602 EXPECT_CALL(*mock_login_utils_, CompleteOffTheRecordLogin(_)) | |
| 603 .Times(1); | |
| 604 | 605 |
| 605 existing_user_controller()->OnSigninScreenReady(); | 606 existing_user_controller()->OnSigninScreenReady(); |
| 606 SetAutoLoginPolicy(kPublicSessionAccountId, kAutoLoginLongDelay); | 607 SetAutoLoginPolicy(kPublicSessionAccountId, kAutoLoginLongDelay); |
| 607 ASSERT_TRUE(auto_login_timer()); | 608 ASSERT_TRUE(auto_login_timer()); |
| 608 | 609 |
| 609 // Login and check that it stopped the timer. | 610 // Login and check that it stopped the timer. |
| 610 existing_user_controller()->LoginAsGuest(); | 611 existing_user_controller()->LoginAsGuest(); |
| 611 EXPECT_TRUE(is_login_in_progress()); | 612 EXPECT_TRUE(is_login_in_progress()); |
| 612 ASSERT_TRUE(auto_login_timer()); | 613 ASSERT_TRUE(auto_login_timer()); |
| 613 EXPECT_FALSE(auto_login_timer()->IsRunning()); | 614 EXPECT_FALSE(auto_login_timer()->IsRunning()); |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 680 // First run propagates public accounts and stores them in Local State. | 681 // First run propagates public accounts and stores them in Local State. |
| 681 } | 682 } |
| 682 | 683 |
| 683 // See http://crbug.com/393704; flaky. | 684 // See http://crbug.com/393704; flaky. |
| 684 IN_PROC_BROWSER_TEST_F(ExistingUserControllerPublicSessionTest, | 685 IN_PROC_BROWSER_TEST_F(ExistingUserControllerPublicSessionTest, |
| 685 DISABLED_TestLoadingPublicUsersFromLocalState) { | 686 DISABLED_TestLoadingPublicUsersFromLocalState) { |
| 686 // Second run loads list of public accounts from Local State. | 687 // Second run loads list of public accounts from Local State. |
| 687 } | 688 } |
| 688 | 689 |
| 689 } // namespace chromeos | 690 } // namespace chromeos |
| OLD | NEW |