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

Side by Side Diff: content/test/layout_test_http_server.cc

Issue 10907162: Reland: Take 2: Force python test server output to be unbuffered, so it doesn't mix with gtest outpu (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Don't use unbuffered mode on Windows. Created 8 years, 3 months 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 | « content/public/test/browser_test_utils.cc ('k') | net/test/local_test_server_posix.cc » ('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) 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 "content/test/layout_test_http_server.h" 5 #include "content/test/layout_test_http_server.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/process_util.h" 10 #include "base/process_util.h"
11 #include "base/string_number_conversions.h" 11 #include "base/string_number_conversions.h"
12 #include "content/public/common/content_paths.h" 12 #include "content/public/common/content_paths.h"
13 #include "net/test/python_utils.h" 13 #include "net/test/python_utils.h"
14 14
15 #if defined(OS_WIN) 15 #if defined(OS_WIN)
16 #include "base/win/windows_version.h" 16 #include "base/win/windows_version.h"
17 #endif 17 #endif
18 18
19 namespace { 19 namespace {
20 20
21 bool PrepareCommandLine(CommandLine* cmd_line) { 21 bool PrepareCommandLine(CommandLine* cmd_line) {
22 FilePath src_path; 22 FilePath src_path;
23 if (!PathService::Get(base::DIR_SOURCE_ROOT, &src_path)) 23 if (!PathService::Get(base::DIR_SOURCE_ROOT, &src_path))
24 return false; 24 return false;
25 25
26 FilePath python_runtime; 26 if (!GetPythonCommand(cmd_line))
27 if (!GetPythonRunTime(&python_runtime))
28 return false; 27 return false;
29 cmd_line->SetProgram(python_runtime);
30 28
31 FilePath script_path(src_path); 29 FilePath script_path(src_path);
32 script_path = script_path.AppendASCII("third_party"); 30 script_path = script_path.AppendASCII("third_party");
33 script_path = script_path.AppendASCII("WebKit"); 31 script_path = script_path.AppendASCII("WebKit");
34 script_path = script_path.AppendASCII("Tools"); 32 script_path = script_path.AppendASCII("Tools");
35 script_path = script_path.AppendASCII("Scripts"); 33 script_path = script_path.AppendASCII("Scripts");
36 script_path = script_path.AppendASCII("new-run-webkit-httpd"); 34 script_path = script_path.AppendASCII("new-run-webkit-httpd");
37 35
38 cmd_line->AppendArgPath(script_path); 36 cmd_line->AppendArgPath(script_path);
39 return true; 37 return true;
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 running_ = !stopped; 123 running_ = !stopped;
126 124
127 #if defined(OS_WIN) 125 #if defined(OS_WIN)
128 // Close the job object handle now. This should clean up 126 // Close the job object handle now. This should clean up
129 // any orphaned processes. 127 // any orphaned processes.
130 job_handle_.Close(); 128 job_handle_.Close();
131 #endif 129 #endif
132 130
133 return stopped; 131 return stopped;
134 } 132 }
OLDNEW
« no previous file with comments | « content/public/test/browser_test_utils.cc ('k') | net/test/local_test_server_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698