| 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" |
| 11 #include "base/logging.h" | |
| 12 #include "base/message_loop.h" | 11 #include "base/message_loop.h" |
| 13 #include "base/path_service.h" | 12 #include "base/path_service.h" |
| 14 #include "base/string_util.h" | 13 #include "base/string_util.h" |
| 15 #include "base/task.h" | 14 #include "base/task.h" |
| 16 #include "base/test/test_timeouts.h" | 15 #include "base/test/test_timeouts.h" |
| 17 #include "base/threading/platform_thread.h" | 16 #include "base/threading/platform_thread.h" |
| 18 #include "base/values.h" | 17 #include "base/values.h" |
| 19 #include "base/synchronization/waitable_event.h" | 18 #include "base/synchronization/waitable_event.h" |
| 20 #include "chrome/browser/browser_thread.h" | 19 #include "chrome/browser/browser_thread.h" |
| 21 #include "chrome/browser/password_manager/encryptor.h" | 20 #include "chrome/browser/password_manager/encryptor.h" |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 net::ProxyConfig proxy_config_; | 99 net::ProxyConfig proxy_config_; |
| 101 }; | 100 }; |
| 102 | 101 |
| 103 LiveSyncTest::LiveSyncTest(TestType test_type) | 102 LiveSyncTest::LiveSyncTest(TestType test_type) |
| 104 : sync_server_(net::TestServer::TYPE_SYNC, FilePath()), | 103 : sync_server_(net::TestServer::TYPE_SYNC, FilePath()), |
| 105 test_type_(test_type), | 104 test_type_(test_type), |
| 106 num_clients_(-1), | 105 num_clients_(-1), |
| 107 test_server_handle_(base::kNullProcessHandle) { | 106 test_server_handle_(base::kNullProcessHandle) { |
| 108 InProcessBrowserTest::set_show_window(true); | 107 InProcessBrowserTest::set_show_window(true); |
| 109 | 108 |
| 110 // TODO(rsimha): Remove after investigating flaky and failing sync tests. | |
| 111 logging::SetMinLogLevel(logging::LOG_VERBOSE); | |
| 112 | |
| 113 switch (test_type_) { | 109 switch (test_type_) { |
| 114 case SINGLE_CLIENT: { | 110 case SINGLE_CLIENT: { |
| 115 num_clients_ = 1; | 111 num_clients_ = 1; |
| 116 break; | 112 break; |
| 117 } | 113 } |
| 118 case TWO_CLIENT: { | 114 case TWO_CLIENT: { |
| 119 num_clients_ = 2; | 115 num_clients_ = 2; |
| 120 break; | 116 break; |
| 121 } | 117 } |
| 122 case MULTIPLE_CLIENT: { | 118 case MULTIPLE_CLIENT: { |
| (...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 467 const net::ProxyConfig& proxy_config) { | 463 const net::ProxyConfig& proxy_config) { |
| 468 base::WaitableEvent done(false, false); | 464 base::WaitableEvent done(false, false); |
| 469 BrowserThread::PostTask( | 465 BrowserThread::PostTask( |
| 470 BrowserThread::IO, | 466 BrowserThread::IO, |
| 471 FROM_HERE, | 467 FROM_HERE, |
| 472 new SetProxyConfigTask(&done, | 468 new SetProxyConfigTask(&done, |
| 473 context_getter, | 469 context_getter, |
| 474 proxy_config)); | 470 proxy_config)); |
| 475 done.Wait(); | 471 done.Wait(); |
| 476 } | 472 } |
| OLD | NEW |