OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chrome/browser/ui/cocoa/profiles/user_manager_mac.h" | 5 #include "chrome/browser/ui/cocoa/profiles/user_manager_mac.h" |
6 | 6 |
7 #include "base/macros.h" | 7 #include "base/macros.h" |
8 #include "base/prefs/pref_service.h" | |
9 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
10 #include "chrome/browser/profiles/profile_window.h" | 9 #include "chrome/browser/profiles/profile_window.h" |
11 #include "chrome/browser/ui/user_manager.h" | 10 #include "chrome/browser/ui/user_manager.h" |
12 #include "chrome/common/pref_names.h" | 11 #include "chrome/common/pref_names.h" |
13 #include "chrome/test/base/browser_with_test_window_test.h" | 12 #include "chrome/test/base/browser_with_test_window_test.h" |
14 #include "chrome/test/base/testing_browser_process.h" | 13 #include "chrome/test/base/testing_browser_process.h" |
15 #include "chrome/test/base/testing_profile_manager.h" | 14 #include "chrome/test/base/testing_profile_manager.h" |
| 15 #include "components/prefs/pref_service.h" |
16 | 16 |
17 class UserManagerMacTest : public BrowserWithTestWindowTest { | 17 class UserManagerMacTest : public BrowserWithTestWindowTest { |
18 public: | 18 public: |
19 UserManagerMacTest() | 19 UserManagerMacTest() |
20 : testing_profile_manager_(TestingBrowserProcess::GetGlobal()) { | 20 : testing_profile_manager_(TestingBrowserProcess::GetGlobal()) { |
21 } | 21 } |
22 | 22 |
23 void SetUp() override { | 23 void SetUp() override { |
24 BrowserWithTestWindowTest::SetUp(); | 24 BrowserWithTestWindowTest::SetUp(); |
25 ASSERT_TRUE(testing_profile_manager_.SetUp()); | 25 ASSERT_TRUE(testing_profile_manager_.SetUp()); |
(...skipping 28 matching lines...) Expand all Loading... |
54 | 54 |
55 EXPECT_FALSE(UserManager::IsShowing()); | 55 EXPECT_FALSE(UserManager::IsShowing()); |
56 UserManager::Show(base::FilePath(), | 56 UserManager::Show(base::FilePath(), |
57 profiles::USER_MANAGER_NO_TUTORIAL, | 57 profiles::USER_MANAGER_NO_TUTORIAL, |
58 profiles::USER_MANAGER_SELECT_PROFILE_NO_ACTION); | 58 profiles::USER_MANAGER_SELECT_PROFILE_NO_ACTION); |
59 EXPECT_TRUE(UserManager::IsShowing()); | 59 EXPECT_TRUE(UserManager::IsShowing()); |
60 | 60 |
61 UserManager::Hide(); | 61 UserManager::Hide(); |
62 EXPECT_FALSE(UserManager::IsShowing()); | 62 EXPECT_FALSE(UserManager::IsShowing()); |
63 } | 63 } |
OLD | NEW |