| 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 <cstdlib> | 5 #include <cstdlib> |
| 6 #include <cstring> | 6 #include <cstring> |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
| 11 #include "base/prefs/testing_pref_service.h" |
| 11 #include "base/values.h" | 12 #include "base/values.h" |
| 12 #include "chrome/browser/browser_process.h" | 13 #include "chrome/browser/browser_process.h" |
| 13 #include "chrome/browser/chromeos/cros/cros_library.h" | 14 #include "chrome/browser/chromeos/cros/cros_library.h" |
| 14 #include "chrome/browser/chromeos/cros/mock_cert_library.h" | 15 #include "chrome/browser/chromeos/cros/mock_cert_library.h" |
| 15 #include "chrome/browser/chromeos/login/user.h" | 16 #include "chrome/browser/chromeos/login/user.h" |
| 16 #include "chrome/browser/chromeos/login/user_manager.h" | 17 #include "chrome/browser/chromeos/login/user_manager.h" |
| 17 #include "chrome/browser/chromeos/login/user_manager_impl.h" | 18 #include "chrome/browser/chromeos/login/user_manager_impl.h" |
| 18 #include "chrome/browser/chromeos/settings/cros_settings.h" | 19 #include "chrome/browser/chromeos/settings/cros_settings.h" |
| 19 #include "chrome/browser/chromeos/settings/cros_settings_names.h" | 20 #include "chrome/browser/chromeos/settings/cros_settings_names.h" |
| 20 #include "chrome/browser/chromeos/settings/cros_settings_provider.h" | 21 #include "chrome/browser/chromeos/settings/cros_settings_provider.h" |
| 21 #include "chrome/browser/chromeos/settings/device_settings_service.h" | 22 #include "chrome/browser/chromeos/settings/device_settings_service.h" |
| 22 #include "chrome/browser/chromeos/settings/stub_cros_settings_provider.h" | 23 #include "chrome/browser/chromeos/settings/stub_cros_settings_provider.h" |
| 23 #include "chrome/test/base/testing_browser_process.h" | 24 #include "chrome/test/base/testing_browser_process.h" |
| 24 #include "chrome/test/base/testing_pref_service.h" | |
| 25 #include "content/public/test/test_browser_thread.h" | 25 #include "content/public/test/test_browser_thread.h" |
| 26 #include "testing/gtest/include/gtest/gtest.h" | 26 #include "testing/gtest/include/gtest/gtest.h" |
| 27 | 27 |
| 28 using ::testing::AnyNumber; | 28 using ::testing::AnyNumber; |
| 29 | 29 |
| 30 namespace chromeos { | 30 namespace chromeos { |
| 31 | 31 |
| 32 class UserManagerTest : public testing::Test { | 32 class UserManagerTest : public testing::Test { |
| 33 public: | 33 public: |
| 34 UserManagerTest() | 34 UserManagerTest() |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 ResetUserManager(); | 191 ResetUserManager(); |
| 192 UserManager::Get()->UserLoggedIn("user0@invalid.domain", false); | 192 UserManager::Get()->UserLoggedIn("user0@invalid.domain", false); |
| 193 ResetUserManager(); | 193 ResetUserManager(); |
| 194 | 194 |
| 195 const UserList* users = &UserManager::Get()->GetUsers(); | 195 const UserList* users = &UserManager::Get()->GetUsers(); |
| 196 EXPECT_EQ(1U, users->size()); | 196 EXPECT_EQ(1U, users->size()); |
| 197 EXPECT_EQ((*users)[0]->email(), "owner@invalid.domain"); | 197 EXPECT_EQ((*users)[0]->email(), "owner@invalid.domain"); |
| 198 } | 198 } |
| 199 | 199 |
| 200 } // namespace chromeos | 200 } // namespace chromeos |
| OLD | NEW |