| 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 net::ProxyConfig proxy_config_; | 99 net::ProxyConfig proxy_config_; |
| 100 }; | 100 }; |
| 101 | 101 |
| 102 LiveSyncTest::LiveSyncTest(TestType test_type) | 102 LiveSyncTest::LiveSyncTest(TestType test_type) |
| 103 : sync_server_(net::TestServer::TYPE_SYNC, FilePath()), | 103 : sync_server_(net::TestServer::TYPE_SYNC, FilePath()), |
| 104 test_type_(test_type), | 104 test_type_(test_type), |
| 105 num_clients_(-1), | 105 num_clients_(-1), |
| 106 test_server_handle_(base::kNullProcessHandle) { | 106 test_server_handle_(base::kNullProcessHandle) { |
| 107 InProcessBrowserTest::set_show_window(true); | 107 InProcessBrowserTest::set_show_window(true); |
| 108 | 108 |
| 109 sync_server_.SetConsoleLogging(false); |
| 110 |
| 109 switch (test_type_) { | 111 switch (test_type_) { |
| 110 case SINGLE_CLIENT: { | 112 case SINGLE_CLIENT: { |
| 111 num_clients_ = 1; | 113 num_clients_ = 1; |
| 112 break; | 114 break; |
| 113 } | 115 } |
| 114 case TWO_CLIENT: { | 116 case TWO_CLIENT: { |
| 115 num_clients_ = 2; | 117 num_clients_ = 2; |
| 116 break; | 118 break; |
| 117 } | 119 } |
| 118 case MULTIPLE_CLIENT: { | 120 case MULTIPLE_CLIENT: { |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 459 const net::ProxyConfig& proxy_config) { | 461 const net::ProxyConfig& proxy_config) { |
| 460 base::WaitableEvent done(false, false); | 462 base::WaitableEvent done(false, false); |
| 461 BrowserThread::PostTask( | 463 BrowserThread::PostTask( |
| 462 BrowserThread::IO, | 464 BrowserThread::IO, |
| 463 FROM_HERE, | 465 FROM_HERE, |
| 464 new SetProxyConfigTask(&done, | 466 new SetProxyConfigTask(&done, |
| 465 context_getter, | 467 context_getter, |
| 466 proxy_config)); | 468 proxy_config)); |
| 467 done.Wait(); | 469 done.Wait(); |
| 468 } | 470 } |
| OLD | NEW |