| 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 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 436 // Add command line arguments that should be applied to all UI tests. | 436 // Add command line arguments that should be applied to all UI tests. |
| 437 PrepareTestCommandline(&command_line, state.include_testing_id); | 437 PrepareTestCommandline(&command_line, state.include_testing_id); |
| 438 | 438 |
| 439 // Sometimes one needs to run the browser under a special environment | 439 // Sometimes one needs to run the browser under a special environment |
| 440 // (e.g. valgrind) without also running the test harness (e.g. python) | 440 // (e.g. valgrind) without also running the test harness (e.g. python) |
| 441 // under the special environment. Provide a way to wrap the browser | 441 // under the special environment. Provide a way to wrap the browser |
| 442 // commandline with a special prefix to invoke the special environment. | 442 // commandline with a special prefix to invoke the special environment. |
| 443 const char* browser_wrapper = getenv("BROWSER_WRAPPER"); | 443 const char* browser_wrapper = getenv("BROWSER_WRAPPER"); |
| 444 if (browser_wrapper) { | 444 if (browser_wrapper) { |
| 445 #if defined(OS_WIN) | 445 #if defined(OS_WIN) |
| 446 command_line.PrependWrapper(ASCIIToWide(browser_wrapper)); | 446 command_line.PrependWrapper(base::ASCIIToWide(browser_wrapper)); |
| 447 #elif defined(OS_POSIX) | 447 #elif defined(OS_POSIX) |
| 448 command_line.PrependWrapper(browser_wrapper); | 448 command_line.PrependWrapper(browser_wrapper); |
| 449 #endif | 449 #endif |
| 450 VLOG(1) << "BROWSER_WRAPPER was set, prefixing command_line with " | 450 VLOG(1) << "BROWSER_WRAPPER was set, prefixing command_line with " |
| 451 << browser_wrapper; | 451 << browser_wrapper; |
| 452 } | 452 } |
| 453 | 453 |
| 454 if (main_launch) | 454 if (main_launch) |
| 455 browser_launch_time_ = base::TimeTicks::Now(); | 455 browser_launch_time_ = base::TimeTicks::Now(); |
| 456 | 456 |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 592 return LaunchBrowserAndServer(state, wait_for_initial_loads); | 592 return LaunchBrowserAndServer(state, wait_for_initial_loads); |
| 593 } | 593 } |
| 594 | 594 |
| 595 void AnonymousProxyLauncher::TerminateConnection() { | 595 void AnonymousProxyLauncher::TerminateConnection() { |
| 596 CloseBrowserAndServer(); | 596 CloseBrowserAndServer(); |
| 597 } | 597 } |
| 598 | 598 |
| 599 std::string AnonymousProxyLauncher::PrefixedChannelID() const { | 599 std::string AnonymousProxyLauncher::PrefixedChannelID() const { |
| 600 return channel_id_; | 600 return channel_id_; |
| 601 } | 601 } |
| OLD | NEW |