OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 | 6 |
7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
8 #include "base/values.h" | 8 #include "base/values.h" |
9 #include "chrome/browser/chromeos/login/existing_user_controller.h" | 9 #include "chrome/browser/chromeos/login/existing_user_controller.h" |
10 #include "chrome/browser/chromeos/login/mock_login_display.h" | 10 #include "chrome/browser/chromeos/login/mock_login_display.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 using testing::ReturnNull; | 27 using testing::ReturnNull; |
28 using testing::_; | 28 using testing::_; |
29 | 29 |
30 namespace chromeos { | 30 namespace chromeos { |
31 | 31 |
32 namespace { | 32 namespace { |
33 | 33 |
34 const char kAutoLoginAccountId[] = "public_session_user@localhost"; | 34 const char kAutoLoginAccountId[] = "public_session_user@localhost"; |
35 // These values are only used to test the configuration. They don't | 35 // These values are only used to test the configuration. They don't |
36 // delay the test. | 36 // delay the test. |
37 const int kAutoLoginNoDelay = 0; | |
38 const int kAutoLoginDelay1 = 60000; | 37 const int kAutoLoginDelay1 = 60000; |
39 const int kAutoLoginDelay2 = 180000; | 38 const int kAutoLoginDelay2 = 180000; |
40 | 39 |
41 } // namespace | 40 } // namespace |
42 | 41 |
43 class ExistingUserControllerAutoLoginTest : public ::testing::Test { | 42 class ExistingUserControllerAutoLoginTest : public ::testing::Test { |
44 protected: | 43 protected: |
45 ExistingUserControllerAutoLoginTest() | 44 ExistingUserControllerAutoLoginTest() |
46 : auto_login_user_id_(policy::GenerateDeviceLocalAccountUserId( | 45 : auto_login_user_id_(policy::GenerateDeviceLocalAccountUserId( |
47 kAutoLoginAccountId, | 46 kAutoLoginAccountId, |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 ConfigureAutoLogin(); | 277 ConfigureAutoLogin(); |
279 ASSERT_TRUE(auto_login_timer()); | 278 ASSERT_TRUE(auto_login_timer()); |
280 EXPECT_FALSE(auto_login_timer()->IsRunning()); | 279 EXPECT_FALSE(auto_login_timer()->IsRunning()); |
281 EXPECT_EQ(auto_login_timer()->GetCurrentDelay().InMilliseconds(), | 280 EXPECT_EQ(auto_login_timer()->GetCurrentDelay().InMilliseconds(), |
282 kAutoLoginDelay2); | 281 kAutoLoginDelay2); |
283 EXPECT_EQ(auto_login_username(), ""); | 282 EXPECT_EQ(auto_login_username(), ""); |
284 EXPECT_EQ(auto_login_delay(), kAutoLoginDelay2); | 283 EXPECT_EQ(auto_login_delay(), kAutoLoginDelay2); |
285 } | 284 } |
286 | 285 |
287 } // namespace chromeos | 286 } // namespace chromeos |
OLD | NEW |