Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(298)

Side by Side Diff: chrome/test/automation/proxy_launcher.cc

Issue 8760011: Move the ProcessType enum out to its own file. This is in preparation for getting rid of ChildPro... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix mac Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/webui/workers_ui.cc ('k') | content/browser/browser_child_process_host.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/environment.h" 7 #include "base/environment.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/string_number_conversions.h" 9 #include "base/string_number_conversions.h"
10 #include "base/string_split.h" 10 #include "base/string_split.h"
11 #include "base/stringprintf.h" 11 #include "base/stringprintf.h"
12 #include "base/test/test_file_util.h" 12 #include "base/test/test_file_util.h"
13 #include "base/test/test_timeouts.h" 13 #include "base/test/test_timeouts.h"
14 #include "base/utf_string_conversions.h" 14 #include "base/utf_string_conversions.h"
15 #include "chrome/app/chrome_command_ids.h" 15 #include "chrome/app/chrome_command_ids.h"
16 #include "chrome/common/automation_constants.h" 16 #include "chrome/common/automation_constants.h"
17 #include "chrome/common/chrome_constants.h" 17 #include "chrome/common/chrome_constants.h"
18 #include "chrome/common/chrome_switches.h" 18 #include "chrome/common/chrome_switches.h"
19 #include "chrome/common/logging_chrome.h" 19 #include "chrome/common/logging_chrome.h"
20 #include "chrome/common/url_constants.h" 20 #include "chrome/common/url_constants.h"
21 #include "chrome/test/automation/automation_proxy.h" 21 #include "chrome/test/automation/automation_proxy.h"
22 #include "chrome/test/base/chrome_process_util.h" 22 #include "chrome/test/base/chrome_process_util.h"
23 #include "chrome/test/base/test_launcher_utils.h" 23 #include "chrome/test/base/test_launcher_utils.h"
24 #include "chrome/test/base/test_switches.h" 24 #include "chrome/test/base/test_switches.h"
25 #include "chrome/test/ui/ui_test.h" 25 #include "chrome/test/ui/ui_test.h"
26 #include "content/common/child_process_info.h"
27 #include "content/common/debug_flags.h" 26 #include "content/common/debug_flags.h"
27 #include "content/public/common/process_type.h"
28 #include "ipc/ipc_channel.h" 28 #include "ipc/ipc_channel.h"
29 #include "ipc/ipc_descriptors.h" 29 #include "ipc/ipc_descriptors.h"
30 #include "sql/connection.h" 30 #include "sql/connection.h"
31 31
32 #if defined(OS_POSIX) 32 #if defined(OS_POSIX)
33 #include <signal.h> 33 #include <signal.h>
34 #endif 34 #endif
35 35
36 namespace { 36 namespace {
37 37
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 436
437 bool ProxyLauncher::LaunchBrowserHelper(const LaunchState& state, 437 bool ProxyLauncher::LaunchBrowserHelper(const LaunchState& state,
438 bool main_launch, 438 bool main_launch,
439 bool wait, 439 bool wait,
440 base::ProcessHandle* process) { 440 base::ProcessHandle* process) {
441 CommandLine command_line(state.command); 441 CommandLine command_line(state.command);
442 442
443 // Add command line arguments that should be applied to all UI tests. 443 // Add command line arguments that should be applied to all UI tests.
444 PrepareTestCommandline(&command_line, state.include_testing_id); 444 PrepareTestCommandline(&command_line, state.include_testing_id);
445 DebugFlags::ProcessDebugFlags( 445 DebugFlags::ProcessDebugFlags(
446 &command_line, ChildProcessInfo::UNKNOWN_PROCESS, false); 446 &command_line, content::PROCESS_TYPE_UNKNOWN, false);
447 447
448 // Sometimes one needs to run the browser under a special environment 448 // Sometimes one needs to run the browser under a special environment
449 // (e.g. valgrind) without also running the test harness (e.g. python) 449 // (e.g. valgrind) without also running the test harness (e.g. python)
450 // under the special environment. Provide a way to wrap the browser 450 // under the special environment. Provide a way to wrap the browser
451 // commandline with a special prefix to invoke the special environment. 451 // commandline with a special prefix to invoke the special environment.
452 const char* browser_wrapper = getenv("BROWSER_WRAPPER"); 452 const char* browser_wrapper = getenv("BROWSER_WRAPPER");
453 if (browser_wrapper) { 453 if (browser_wrapper) {
454 #if defined(OS_WIN) 454 #if defined(OS_WIN)
455 command_line.PrependWrapper(ASCIIToWide(browser_wrapper)); 455 command_line.PrependWrapper(ASCIIToWide(browser_wrapper));
456 #elif defined(OS_POSIX) 456 #elif defined(OS_POSIX)
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 return LaunchBrowserAndServer(state, wait_for_initial_loads); 599 return LaunchBrowserAndServer(state, wait_for_initial_loads);
600 } 600 }
601 601
602 void AnonymousProxyLauncher::TerminateConnection() { 602 void AnonymousProxyLauncher::TerminateConnection() {
603 CloseBrowserAndServer(); 603 CloseBrowserAndServer();
604 } 604 }
605 605
606 std::string AnonymousProxyLauncher::PrefixedChannelID() const { 606 std::string AnonymousProxyLauncher::PrefixedChannelID() const {
607 return channel_id_; 607 return channel_id_;
608 } 608 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/workers_ui.cc ('k') | content/browser/browser_child_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698