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 "ash/common/system/tray/system_tray.h" | 5 #include "ash/common/system/tray/system_tray.h" |
6 #include "ash/shell.h" | 6 #include "ash/shell.h" |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
11 #include "base/threading/thread_task_runner_handle.h" | 11 #include "base/threading/thread_task_runner_handle.h" |
12 #include "chrome/browser/chrome_notification_types.h" | 12 #include "chrome/browser/chrome_notification_types.h" |
13 #include "chrome/browser/chromeos/login/login_manager_test.h" | 13 #include "chrome/browser/chromeos/login/login_manager_test.h" |
14 #include "chrome/browser/chromeos/login/login_wizard.h" | 14 #include "chrome/browser/chromeos/login/login_wizard.h" |
15 #include "chrome/browser/chromeos/login/startup_utils.h" | 15 #include "chrome/browser/chromeos/login/startup_utils.h" |
16 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h" | 16 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h" |
17 #include "chrome/browser/chromeos/login/wizard_controller.h" | 17 #include "chrome/browser/chromeos/login/wizard_controller.h" |
18 #include "chrome/browser/chromeos/settings/cros_settings.h" | 18 #include "chrome/browser/chromeos/settings/cros_settings.h" |
19 #include "chrome/browser/profiles/profile_manager.h" | 19 #include "chrome/browser/profiles/profile_manager.h" |
20 #include "chrome/browser/profiles/profiles_state.h" | 20 #include "chrome/browser/profiles/profiles_state.h" |
21 #include "chrome/browser/ui/browser.h" | 21 #include "chrome/browser/ui/browser.h" |
22 #include "chrome/common/chrome_constants.h" | 22 #include "chrome/common/chrome_constants.h" |
23 #include "chrome/common/chrome_switches.h" | 23 #include "chrome/common/chrome_switches.h" |
24 #include "chrome/test/base/in_process_browser_test.h" | 24 #include "chrome/test/base/in_process_browser_test.h" |
25 #include "chrome/test/base/interactive_test_utils.h" | 25 #include "chrome/test/base/interactive_test_utils.h" |
26 #include "chromeos/chromeos_switches.h" | 26 #include "chromeos/chromeos_switches.h" |
27 #include "chromeos/login/user_names.h" | |
28 #include "chromeos/settings/cros_settings_names.h" | 27 #include "chromeos/settings/cros_settings_names.h" |
29 #include "components/signin/core/account_id/account_id.h" | 28 #include "components/signin/core/account_id/account_id.h" |
| 29 #include "components/user_manager/user_names.h" |
30 #include "content/public/test/browser_test_utils.h" | 30 #include "content/public/test/browser_test_utils.h" |
31 #include "content/public/test/test_utils.h" | 31 #include "content/public/test/test_utils.h" |
32 #include "extensions/browser/extension_system.h" | 32 #include "extensions/browser/extension_system.h" |
33 #include "testing/gmock/include/gmock/gmock.h" | 33 #include "testing/gmock/include/gmock/gmock.h" |
34 #include "testing/gtest/include/gtest/gtest.h" | 34 #include "testing/gtest/include/gtest/gtest.h" |
35 | 35 |
36 using ::testing::_; | 36 using ::testing::_; |
37 using ::testing::AnyNumber; | 37 using ::testing::AnyNumber; |
38 using ::testing::Return; | 38 using ::testing::Return; |
39 | 39 |
(...skipping 11 matching lines...) Expand all Loading... |
51 command_line->AppendSwitchASCII(switches::kLoginProfile, "hash"); | 51 command_line->AppendSwitchASCII(switches::kLoginProfile, "hash"); |
52 } | 52 } |
53 }; | 53 }; |
54 | 54 |
55 class LoginGuestTest : public InProcessBrowserTest { | 55 class LoginGuestTest : public InProcessBrowserTest { |
56 protected: | 56 protected: |
57 void SetUpCommandLine(base::CommandLine* command_line) override { | 57 void SetUpCommandLine(base::CommandLine* command_line) override { |
58 command_line->AppendSwitch(switches::kGuestSession); | 58 command_line->AppendSwitch(switches::kGuestSession); |
59 command_line->AppendSwitch(::switches::kIncognito); | 59 command_line->AppendSwitch(::switches::kIncognito); |
60 command_line->AppendSwitchASCII(switches::kLoginProfile, "hash"); | 60 command_line->AppendSwitchASCII(switches::kLoginProfile, "hash"); |
61 command_line->AppendSwitchASCII(switches::kLoginUser, | 61 command_line->AppendSwitchASCII( |
62 login::GuestAccountId().GetUserEmail()); | 62 switches::kLoginUser, user_manager::GuestAccountId().GetUserEmail()); |
63 } | 63 } |
64 }; | 64 }; |
65 | 65 |
66 class LoginCursorTest : public InProcessBrowserTest { | 66 class LoginCursorTest : public InProcessBrowserTest { |
67 protected: | 67 protected: |
68 void SetUpCommandLine(base::CommandLine* command_line) override { | 68 void SetUpCommandLine(base::CommandLine* command_line) override { |
69 command_line->AppendSwitch(switches::kLoginManager); | 69 command_line->AppendSwitch(switches::kLoginManager); |
70 } | 70 } |
71 }; | 71 }; |
72 | 72 |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 content::WindowedNotificationObserver session_start_waiter( | 259 content::WindowedNotificationObserver session_start_waiter( |
260 chrome::NOTIFICATION_SESSION_STARTED, | 260 chrome::NOTIFICATION_SESSION_STARTED, |
261 content::NotificationService::AllSources()); | 261 content::NotificationService::AllSources()); |
262 SubmitGaiaAuthOfflineForm(kTestUser, kPassword); | 262 SubmitGaiaAuthOfflineForm(kTestUser, kPassword); |
263 session_start_waiter.Wait(); | 263 session_start_waiter.Wait(); |
264 | 264 |
265 TestSystemTrayIsVisible(); | 265 TestSystemTrayIsVisible(); |
266 } | 266 } |
267 | 267 |
268 } // namespace chromeos | 268 } // namespace chromeos |
OLD | NEW |