OLD | NEW |
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/live_sync/live_sync_test.h" | 5 #include "chrome/test/live_sync/live_sync_test.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 CommandLine::StringType server_cmdline_string = cl->GetSwitchValueNative( | 403 CommandLine::StringType server_cmdline_string = cl->GetSwitchValueNative( |
404 switches::kSyncServerCommandLine); | 404 switches::kSyncServerCommandLine); |
405 CommandLine::StringVector server_cmdline_vector; | 405 CommandLine::StringVector server_cmdline_vector; |
406 CommandLine::StringType delimiters(FILE_PATH_LITERAL(" ")); | 406 CommandLine::StringType delimiters(FILE_PATH_LITERAL(" ")); |
407 Tokenize(server_cmdline_string, delimiters, &server_cmdline_vector); | 407 Tokenize(server_cmdline_string, delimiters, &server_cmdline_vector); |
408 CommandLine server_cmdline(server_cmdline_vector); | 408 CommandLine server_cmdline(server_cmdline_vector); |
409 base::LaunchOptions options; | 409 base::LaunchOptions options; |
410 #if defined(OS_WIN) | 410 #if defined(OS_WIN) |
411 options.start_hidden = true; | 411 options.start_hidden = true; |
412 #endif | 412 #endif |
413 options.process_handle = &test_server_handle_; | 413 if (!base::LaunchProcess(server_cmdline, options, &test_server_handle_)) |
414 if (!base::LaunchProcess(server_cmdline, options)) | |
415 LOG(ERROR) << "Could not launch local test server."; | 414 LOG(ERROR) << "Could not launch local test server."; |
416 | 415 |
417 const int kMaxWaitTime = TestTimeouts::live_operation_timeout_ms(); | 416 const int kMaxWaitTime = TestTimeouts::live_operation_timeout_ms(); |
418 const int kNumIntervals = 15; | 417 const int kNumIntervals = 15; |
419 if (WaitForTestServerToStart(kMaxWaitTime, kNumIntervals)) { | 418 if (WaitForTestServerToStart(kMaxWaitTime, kNumIntervals)) { |
420 VLOG(1) << "Started local test server at " | 419 VLOG(1) << "Started local test server at " |
421 << cl->GetSwitchValueASCII(switches::kSyncServiceURL) << "."; | 420 << cl->GetSwitchValueASCII(switches::kSyncServiceURL) << "."; |
422 return true; | 421 return true; |
423 } else { | 422 } else { |
424 LOG(ERROR) << "Could not start local test server at " | 423 LOG(ERROR) << "Could not start local test server at " |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
515 const net::ProxyConfig& proxy_config) { | 514 const net::ProxyConfig& proxy_config) { |
516 base::WaitableEvent done(false, false); | 515 base::WaitableEvent done(false, false); |
517 BrowserThread::PostTask( | 516 BrowserThread::PostTask( |
518 BrowserThread::IO, | 517 BrowserThread::IO, |
519 FROM_HERE, | 518 FROM_HERE, |
520 new SetProxyConfigTask(&done, | 519 new SetProxyConfigTask(&done, |
521 context_getter, | 520 context_getter, |
522 proxy_config)); | 521 proxy_config)); |
523 done.Wait(); | 522 done.Wait(); |
524 } | 523 } |
OLD | NEW |