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 "base/stringprintf.h" | 7 #include "base/stringprintf.h" |
8 #include "chrome/browser/browser_process.h" | 8 #include "chrome/browser/browser_process.h" |
9 #include "chrome/browser/chrome_browser_main.h" | 9 #include "chrome/browser/chrome_browser_main.h" |
10 #include "chrome/browser/chrome_browser_main_extra_parts.h" | 10 #include "chrome/browser/chrome_browser_main_extra_parts.h" |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 public: | 138 public: |
139 KioskTest() : chromeos::CrosInProcessBrowserTest() { | 139 KioskTest() : chromeos::CrosInProcessBrowserTest() { |
140 SetExitWhenLastBrowserCloses(false); | 140 SetExitWhenLastBrowserCloses(false); |
141 } | 141 } |
142 | 142 |
143 protected: | 143 protected: |
144 | 144 |
145 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 145 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
146 command_line->AppendSwitch(chromeos::switches::kLoginManager); | 146 command_line->AppendSwitch(chromeos::switches::kLoginManager); |
147 command_line->AppendSwitch(chromeos::switches::kForceLoginManagerInTests); | 147 command_line->AppendSwitch(chromeos::switches::kForceLoginManagerInTests); |
148 command_line->AppendSwitch(::switches::kDisableChromeCaptivePortalDetector); | 148 command_line->AppendSwitch( |
| 149 chromeos::switches::kDisableChromeCaptivePortalDetector); |
149 command_line->AppendSwitch(::switches::kDisableBackgroundNetworking); | 150 command_line->AppendSwitch(::switches::kDisableBackgroundNetworking); |
150 command_line->AppendSwitchASCII(chromeos::switches::kLoginProfile, "user"); | 151 command_line->AppendSwitchASCII(chromeos::switches::kLoginProfile, "user"); |
151 | 152 |
152 ASSERT_TRUE(test_server()->Start()); | 153 ASSERT_TRUE(test_server()->Start()); |
153 net::HostPortPair host_port = test_server()->host_port_pair(); | 154 net::HostPortPair host_port = test_server()->host_port_pair(); |
154 std::string test_gallery_url = base::StringPrintf( | 155 std::string test_gallery_url = base::StringPrintf( |
155 "http://%s:%d/files/chromeos/app_mode/webstore", | 156 "http://%s:%d/files/chromeos/app_mode/webstore", |
156 kWebstoreDomain, host_port.port()); | 157 kWebstoreDomain, host_port.port()); |
157 command_line->AppendSwitchASCII( | 158 command_line->AppendSwitchASCII( |
158 ::switches::kAppsGalleryURL, test_gallery_url); | 159 ::switches::kAppsGalleryURL, test_gallery_url); |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 // The second loop exits when kiosk app terminates and we receive | 218 // The second loop exits when kiosk app terminates and we receive |
218 // NOTIFICATION_RENDERER_PROCESS_CLOSED. | 219 // NOTIFICATION_RENDERER_PROCESS_CLOSED. |
219 scoped_refptr<content::MessageLoopRunner> runner2 = | 220 scoped_refptr<content::MessageLoopRunner> runner2 = |
220 new content::MessageLoopRunner; | 221 new content::MessageLoopRunner; |
221 content_browser_client_->browser_main_extra_parts_->set_quit_task( | 222 content_browser_client_->browser_main_extra_parts_->set_quit_task( |
222 runner2->QuitClosure()); | 223 runner2->QuitClosure()); |
223 runner2->Run(); | 224 runner2->Run(); |
224 } | 225 } |
225 | 226 |
226 } // namespace chromeos | 227 } // namespace chromeos |
OLD | NEW |