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 "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "chrome/browser/ui/webui/options/options_ui_browsertest.h" | 6 #include "chrome/browser/ui/webui/options/options_ui_browsertest.h" |
7 #include "chrome/common/chrome_switches.h" | 7 #include "chrome/common/chrome_switches.h" |
8 #include "chrome/test/base/testing_profile.h" | 8 #include "chrome/test/base/testing_profile.h" |
9 #include "chromeos/chromeos_switches.h" | 9 #include "chromeos/chromeos_switches.h" |
10 #include "chromeos/login/user_names.h" | |
11 #include "components/signin/core/account_id/account_id.h" | 10 #include "components/signin/core/account_id/account_id.h" |
| 11 #include "components/user_manager/user_names.h" |
12 | 12 |
13 namespace { | 13 namespace { |
14 | 14 |
15 // Same as OptionsUIBrowserTest but launches with Guest mode command line | 15 // Same as OptionsUIBrowserTest but launches with Guest mode command line |
16 // switches. | 16 // switches. |
17 class GuestModeOptionsBrowserTest : public options::OptionsUIBrowserTest { | 17 class GuestModeOptionsBrowserTest : public options::OptionsUIBrowserTest { |
18 public: | 18 public: |
19 GuestModeOptionsBrowserTest() : OptionsUIBrowserTest() {} | 19 GuestModeOptionsBrowserTest() : OptionsUIBrowserTest() {} |
20 | 20 |
21 void SetUpCommandLine(base::CommandLine* command_line) override { | 21 void SetUpCommandLine(base::CommandLine* command_line) override { |
22 command_line->AppendSwitch(chromeos::switches::kGuestSession); | 22 command_line->AppendSwitch(chromeos::switches::kGuestSession); |
23 command_line->AppendSwitchASCII( | 23 command_line->AppendSwitchASCII( |
24 chromeos::switches::kLoginUser, | 24 chromeos::switches::kLoginUser, |
25 chromeos::login::GuestAccountId().GetUserEmail()); | 25 user_manager::GuestAccountId().GetUserEmail()); |
26 command_line->AppendSwitchASCII(chromeos::switches::kLoginProfile, | 26 command_line->AppendSwitchASCII(chromeos::switches::kLoginProfile, |
27 TestingProfile::kTestUserProfileDir); | 27 TestingProfile::kTestUserProfileDir); |
28 command_line->AppendSwitch(switches::kIncognito); | 28 command_line->AppendSwitch(switches::kIncognito); |
29 } | 29 } |
30 }; | 30 }; |
31 | 31 |
32 IN_PROC_BROWSER_TEST_F(GuestModeOptionsBrowserTest, LoadOptionsByURL) { | 32 IN_PROC_BROWSER_TEST_F(GuestModeOptionsBrowserTest, LoadOptionsByURL) { |
33 NavigateToSettings(); | 33 NavigateToSettings(); |
34 VerifyTitle(); | 34 VerifyTitle(); |
35 VerifyNavbar(); | 35 VerifyNavbar(); |
36 } | 36 } |
37 | 37 |
38 } // namespace | 38 } // namespace |
OLD | NEW |