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 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
434 CommandLine::StringType delimiters(FILE_PATH_LITERAL(" ")); | 434 CommandLine::StringType delimiters(FILE_PATH_LITERAL(" ")); |
435 Tokenize(server_cmdline_string, delimiters, &server_cmdline_vector); | 435 Tokenize(server_cmdline_string, delimiters, &server_cmdline_vector); |
436 CommandLine server_cmdline(server_cmdline_vector); | 436 CommandLine server_cmdline(server_cmdline_vector); |
437 base::LaunchOptions options; | 437 base::LaunchOptions options; |
438 #if defined(OS_WIN) | 438 #if defined(OS_WIN) |
439 options.start_hidden = true; | 439 options.start_hidden = true; |
440 #endif | 440 #endif |
441 if (!base::LaunchProcess(server_cmdline, options, &test_server_handle_)) | 441 if (!base::LaunchProcess(server_cmdline, options, &test_server_handle_)) |
442 LOG(ERROR) << "Could not launch local test server."; | 442 LOG(ERROR) << "Could not launch local test server."; |
443 | 443 |
444 const int kMaxWaitTime = TestTimeouts::live_operation_timeout_ms(); | 444 const int kMaxWaitTime = TestTimeouts::action_max_timeout_ms(); |
445 const int kNumIntervals = 15; | 445 const int kNumIntervals = 15; |
446 if (WaitForTestServerToStart(kMaxWaitTime, kNumIntervals)) { | 446 if (WaitForTestServerToStart(kMaxWaitTime, kNumIntervals)) { |
447 VLOG(1) << "Started local test server at " | 447 VLOG(1) << "Started local test server at " |
448 << cl->GetSwitchValueASCII(switches::kSyncServiceURL) << "."; | 448 << cl->GetSwitchValueASCII(switches::kSyncServiceURL) << "."; |
449 return true; | 449 return true; |
450 } else { | 450 } else { |
451 LOG(ERROR) << "Could not start local test server at " | 451 LOG(ERROR) << "Could not start local test server at " |
452 << cl->GetSwitchValueASCII(switches::kSyncServiceURL) << "."; | 452 << cl->GetSwitchValueASCII(switches::kSyncServiceURL) << "."; |
453 return false; | 453 return false; |
454 } | 454 } |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
575 const net::ProxyConfig& proxy_config) { | 575 const net::ProxyConfig& proxy_config) { |
576 base::WaitableEvent done(false, false); | 576 base::WaitableEvent done(false, false); |
577 BrowserThread::PostTask( | 577 BrowserThread::PostTask( |
578 BrowserThread::IO, | 578 BrowserThread::IO, |
579 FROM_HERE, | 579 FROM_HERE, |
580 new SetProxyConfigTask(&done, | 580 new SetProxyConfigTask(&done, |
581 context_getter, | 581 context_getter, |
582 proxy_config)); | 582 proxy_config)); |
583 done.Wait(); | 583 done.Wait(); |
584 } | 584 } |
OLD | NEW |