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 "chrome/test/automation/proxy_launcher.h" | 5 #include "chrome/test/automation/proxy_launcher.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/environment.h" | 9 #include "base/environment.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
419 | 419 |
420 #ifdef WAIT_FOR_DEBUGGER_ON_OPEN | 420 #ifdef WAIT_FOR_DEBUGGER_ON_OPEN |
421 command_line->AppendSwitch(switches::kDebugOnStart); | 421 command_line->AppendSwitch(switches::kDebugOnStart); |
422 #endif | 422 #endif |
423 | 423 |
424 // Force the app to always exit when the last browser window is closed. | 424 // Force the app to always exit when the last browser window is closed. |
425 command_line->AppendSwitch(switches::kDisableZeroBrowsersOpenForTests); | 425 command_line->AppendSwitch(switches::kDisableZeroBrowsersOpenForTests); |
426 | 426 |
427 // Allow file:// access on ChromeOS. | 427 // Allow file:// access on ChromeOS. |
428 command_line->AppendSwitch(switches::kAllowFileAccess); | 428 command_line->AppendSwitch(switches::kAllowFileAccess); |
| 429 |
| 430 // The tests assume that file:// URIs can freely access other file:// URIs. |
| 431 command_line->AppendSwitch(switches::kAllowFileAccessFromFiles); |
429 } | 432 } |
430 | 433 |
431 bool ProxyLauncher::LaunchBrowserHelper(const LaunchState& state, | 434 bool ProxyLauncher::LaunchBrowserHelper(const LaunchState& state, |
432 bool main_launch, | 435 bool main_launch, |
433 bool wait, | 436 bool wait, |
434 base::ProcessHandle* process) { | 437 base::ProcessHandle* process) { |
435 CommandLine command_line(state.command); | 438 CommandLine command_line(state.command); |
436 | 439 |
437 // Add command line arguments that should be applied to all UI tests. | 440 // Add command line arguments that should be applied to all UI tests. |
438 PrepareTestCommandline(&command_line, state.include_testing_id); | 441 PrepareTestCommandline(&command_line, state.include_testing_id); |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
595 return LaunchBrowserAndServer(state, wait_for_initial_loads); | 598 return LaunchBrowserAndServer(state, wait_for_initial_loads); |
596 } | 599 } |
597 | 600 |
598 void AnonymousProxyLauncher::TerminateConnection() { | 601 void AnonymousProxyLauncher::TerminateConnection() { |
599 CloseBrowserAndServer(); | 602 CloseBrowserAndServer(); |
600 } | 603 } |
601 | 604 |
602 std::string AnonymousProxyLauncher::PrefixedChannelID() const { | 605 std::string AnonymousProxyLauncher::PrefixedChannelID() const { |
603 return channel_id_; | 606 return channel_id_; |
604 } | 607 } |
OLD | NEW |