| 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/macros.h" |
| 9 #include "chromeos/chromeos_switches.h" | 10 #include "chromeos/chromeos_switches.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
| 11 | 12 |
| 12 namespace { | 13 namespace { |
| 13 const char kTestUserHash[] = "testuserhash"; | 14 const char kTestUserHash[] = "testuserhash"; |
| 14 } // namespace | 15 } // namespace |
| 15 | 16 |
| 16 namespace chromeos { | 17 namespace chromeos { |
| 17 | 18 |
| 18 class LoginStateTest : public testing::Test, | 19 class LoginStateTest : public testing::Test, |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 LoginState::Get()->GetLoggedInUserType()); | 144 LoginState::Get()->GetLoggedInUserType()); |
| 144 EXPECT_TRUE(LoginState::Get()->IsUserLoggedIn()); | 145 EXPECT_TRUE(LoginState::Get()->IsUserLoggedIn()); |
| 145 EXPECT_FALSE(LoginState::Get()->IsInSafeMode()); | 146 EXPECT_FALSE(LoginState::Get()->IsInSafeMode()); |
| 146 EXPECT_EQ(kTestUserHash, LoginState::Get()->primary_user_hash()); | 147 EXPECT_EQ(kTestUserHash, LoginState::Get()->primary_user_hash()); |
| 147 | 148 |
| 148 EXPECT_EQ(1U, GetNewLoginStateChangesCount()); | 149 EXPECT_EQ(1U, GetNewLoginStateChangesCount()); |
| 149 EXPECT_EQ(LoginState::LOGGED_IN_USER_REGULAR, logged_in_user_type_); | 150 EXPECT_EQ(LoginState::LOGGED_IN_USER_REGULAR, logged_in_user_type_); |
| 150 } | 151 } |
| 151 | 152 |
| 152 } // namespace chromeos | 153 } // namespace chromeos |
| OLD | NEW |