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 "chromeos/login/login_state.h" | 5 #include "chromeos/login/login_state.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "chromeos/chromeos_switches.h" | 10 #include "chromeos/chromeos_switches.h" |
11 #include "chromeos/dbus/dbus_thread_manager.h" | 11 #include "chromeos/dbus/dbus_thread_manager.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
13 | 13 |
14 namespace chromeos { | 14 namespace chromeos { |
15 | 15 |
16 class LoginStateTest : public testing::Test, | 16 class LoginStateTest : public testing::Test, |
17 public LoginState::Observer { | 17 public LoginState::Observer { |
18 public: | 18 public: |
19 LoginStateTest() | 19 LoginStateTest() |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 EXPECT_EQ(LoginState::LOGGED_IN_USER_REGULAR, | 67 EXPECT_EQ(LoginState::LOGGED_IN_USER_REGULAR, |
68 LoginState::Get()->GetLoggedInUserType()); | 68 LoginState::Get()->GetLoggedInUserType()); |
69 EXPECT_TRUE(LoginState::Get()->IsUserLoggedIn()); | 69 EXPECT_TRUE(LoginState::Get()->IsUserLoggedIn()); |
70 // Run the message loop, observer should update members. | 70 // Run the message loop, observer should update members. |
71 message_loop_.RunUntilIdle(); | 71 message_loop_.RunUntilIdle(); |
72 EXPECT_EQ(LoginState::LOGGED_IN_ACTIVE, logged_in_state_); | 72 EXPECT_EQ(LoginState::LOGGED_IN_ACTIVE, logged_in_state_); |
73 EXPECT_EQ(LoginState::LOGGED_IN_USER_REGULAR, logged_in_user_type_); | 73 EXPECT_EQ(LoginState::LOGGED_IN_USER_REGULAR, logged_in_user_type_); |
74 } | 74 } |
75 | 75 |
76 } // namespace | 76 } // namespace |
OLD | NEW |