OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "base/path_service.h" | 6 #include "base/path_service.h" |
7 #include "chrome/browser/chrome_browser_main.h" | 7 #include "chrome/browser/chrome_browser_main.h" |
8 #include "chrome/browser/chrome_browser_main_extra_parts.h" | 8 #include "chrome/browser/chrome_browser_main_extra_parts.h" |
9 #include "chrome/browser/chrome_content_browser_client.h" | 9 #include "chrome/browser/chrome_content_browser_client.h" |
10 #include "chrome/browser/chromeos/cros/cros_in_process_browser_test.h" | 10 #include "chrome/browser/chromeos/cros/cros_in_process_browser_test.h" |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 DISALLOW_COPY_AND_ASSIGN(TestContentBrowserClient); | 128 DISALLOW_COPY_AND_ASSIGN(TestContentBrowserClient); |
129 }; | 129 }; |
130 | 130 |
131 const base::FilePath kServiceLogin("chromeos/service_login.html"); | 131 const base::FilePath kServiceLogin("chromeos/service_login.html"); |
132 | 132 |
133 class OobeTest : public chromeos::CrosInProcessBrowserTest { | 133 class OobeTest : public chromeos::CrosInProcessBrowserTest { |
134 protected: | 134 protected: |
135 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 135 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
136 command_line->AppendSwitch(chromeos::switches::kLoginManager); | 136 command_line->AppendSwitch(chromeos::switches::kLoginManager); |
137 command_line->AppendSwitch(chromeos::switches::kForceLoginManagerInTests); | 137 command_line->AppendSwitch(chromeos::switches::kForceLoginManagerInTests); |
138 command_line->AppendSwitch(switches::kDisableChromeCaptivePortalDetector); | 138 command_line->AppendSwitch( |
| 139 chromeos::switches::kDisableChromeCaptivePortalDetector); |
139 command_line->AppendSwitchASCII(chromeos::switches::kLoginProfile, "user"); | 140 command_line->AppendSwitchASCII(chromeos::switches::kLoginProfile, "user"); |
140 command_line->AppendSwitchASCII(switches::kAuthExtensionPath, "gaia_auth"); | 141 command_line->AppendSwitchASCII( |
| 142 chromeos::switches::kAuthExtensionPath, "gaia_auth"); |
141 } | 143 } |
142 | 144 |
143 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { | 145 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { |
144 content_browser_client_.reset(new TestContentBrowserClient()); | 146 content_browser_client_.reset(new TestContentBrowserClient()); |
145 original_content_browser_client_ = content::SetBrowserClientForTesting( | 147 original_content_browser_client_ = content::SetBrowserClientForTesting( |
146 content_browser_client_.get()); | 148 content_browser_client_.get()); |
147 base::FilePath test_data_dir; | 149 base::FilePath test_data_dir; |
148 PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir); | 150 PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir); |
149 CHECK(file_util::ReadFileToString(test_data_dir.Append(kServiceLogin), | 151 CHECK(file_util::ReadFileToString(test_data_dir.Append(kServiceLogin), |
150 &service_login_response_)); | 152 &service_login_response_)); |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 wizard_controller->SkipToLoginForTesting(); | 219 wizard_controller->SkipToLoginForTesting(); |
218 | 220 |
219 scoped_refptr<content::MessageLoopRunner> runner = | 221 scoped_refptr<content::MessageLoopRunner> runner = |
220 new content::MessageLoopRunner; | 222 new content::MessageLoopRunner; |
221 content_browser_client_->browser_main_extra_parts_->set_quit_task( | 223 content_browser_client_->browser_main_extra_parts_->set_quit_task( |
222 runner->QuitClosure()); | 224 runner->QuitClosure()); |
223 runner->Run(); | 225 runner->Run(); |
224 } | 226 } |
225 | 227 |
226 } | 228 } |
OLD | NEW |