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

Side by Side Diff: chrome/browser/safe_browsing/safe_browsing_test.cc

Issue 7377012: Change base::LaunchProcess API slightly (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 5 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
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 // This test uses the safebrowsing test server published at 5 // This test uses the safebrowsing test server published at
6 // http://code.google.com/p/google-safe-browsing/ to test the safebrowsing 6 // http://code.google.com/p/google-safe-browsing/ to test the safebrowsing
7 // protocol implemetation. Details of the safebrowsing testing flow is 7 // protocol implemetation. Details of the safebrowsing testing flow is
8 // documented at 8 // documented at
9 // http://code.google.com/p/google-safe-browsing/wiki/ProtocolTesting 9 // http://code.google.com/p/google-safe-browsing/wiki/ProtocolTesting
10 // 10 //
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 FilePath datafile = testserver_path.Append(datafile_); 142 FilePath datafile = testserver_path.Append(datafile_);
143 cmd_line.AppendArgPath(testserver); 143 cmd_line.AppendArgPath(testserver);
144 cmd_line.AppendArg(base::StringPrintf("--port=%d", kPort_)); 144 cmd_line.AppendArg(base::StringPrintf("--port=%d", kPort_));
145 cmd_line.AppendArgNative(FILE_PATH_LITERAL("--datafile=") + 145 cmd_line.AppendArgNative(FILE_PATH_LITERAL("--datafile=") +
146 datafile.value()); 146 datafile.value());
147 147
148 base::LaunchOptions options; 148 base::LaunchOptions options;
149 #if defined(OS_WIN) 149 #if defined(OS_WIN)
150 options.start_hidden = true; 150 options.start_hidden = true;
151 #endif 151 #endif
152 options.process_handle = &server_handle_; 152 if (!base::LaunchProcess(cmd_line, options, &server_handle_)) {
153 if (!base::LaunchProcess(cmd_line, options)) {
154 LOG(ERROR) << "Failed to launch server: " 153 LOG(ERROR) << "Failed to launch server: "
155 << cmd_line.command_line_string(); 154 << cmd_line.command_line_string();
156 return false; 155 return false;
157 } 156 }
158 return true; 157 return true;
159 } 158 }
160 159
161 // Stop the python server test suite. 160 // Stop the python server test suite.
162 bool Stop() { 161 bool Stop() {
163 if (server_handle_ == base::kNullProcessHandle) 162 if (server_handle_ == base::kNullProcessHandle)
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 } 636 }
638 637
639 // Verifies with server if test is done and waits till server responses. 638 // Verifies with server if test is done and waits till server responses.
640 EXPECT_EQ(net::URLRequestStatus::SUCCESS, 639 EXPECT_EQ(net::URLRequestStatus::SUCCESS,
641 safe_browsing_helper->VerifyTestComplete(server_host, 640 safe_browsing_helper->VerifyTestComplete(server_host,
642 server_port, 641 server_port,
643 last_step)); 642 last_step));
644 EXPECT_EQ("yes", safe_browsing_helper->response_data()); 643 EXPECT_EQ("yes", safe_browsing_helper->response_data());
645 test_server.Stop(); 644 test_server.Stop();
646 } 645 }
OLDNEW
« no previous file with comments | « chrome/browser/process_singleton_uitest.cc ('k') | chrome/browser/service/service_process_control.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698