| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/logging.h" |
| 10 #include "base/message_loop.h" | 11 #include "base/message_loop.h" |
| 11 #include "base/path_service.h" | 12 #include "base/path_service.h" |
| 12 #include "base/platform_thread.h" | 13 #include "base/platform_thread.h" |
| 13 #include "base/string_util.h" | 14 #include "base/string_util.h" |
| 14 #include "base/task.h" | 15 #include "base/task.h" |
| 15 #include "base/test/test_timeouts.h" | 16 #include "base/test/test_timeouts.h" |
| 16 #include "base/waitable_event.h" | 17 #include "base/waitable_event.h" |
| 17 #include "chrome/browser/browser_thread.h" | 18 #include "chrome/browser/browser_thread.h" |
| 18 #include "chrome/browser/password_manager/encryptor.h" | 19 #include "chrome/browser/password_manager/encryptor.h" |
| 19 #include "chrome/browser/profile.h" | 20 #include "chrome/browser/profile.h" |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 URLRequestContextGetter* url_request_context_getter_; | 87 URLRequestContextGetter* url_request_context_getter_; |
| 87 net::ProxyConfig proxy_config_; | 88 net::ProxyConfig proxy_config_; |
| 88 }; | 89 }; |
| 89 | 90 |
| 90 LiveSyncTest::LiveSyncTest(TestType test_type) | 91 LiveSyncTest::LiveSyncTest(TestType test_type) |
| 91 : sync_server_(net::TestServer::TYPE_SYNC, FilePath()), | 92 : sync_server_(net::TestServer::TYPE_SYNC, FilePath()), |
| 92 test_type_(test_type), | 93 test_type_(test_type), |
| 93 num_clients_(-1), | 94 num_clients_(-1), |
| 94 test_server_handle_(base::kNullProcessHandle) { | 95 test_server_handle_(base::kNullProcessHandle) { |
| 95 InProcessBrowserTest::set_show_window(true); | 96 InProcessBrowserTest::set_show_window(true); |
| 97 |
| 98 // TODO(rsimha): Remove after investigating flaky and failing sync tests. |
| 99 logging::SetMinLogLevel(logging::LOG_VERBOSE); |
| 100 |
| 96 switch (test_type_) { | 101 switch (test_type_) { |
| 97 case SINGLE_CLIENT: { | 102 case SINGLE_CLIENT: { |
| 98 num_clients_ = 1; | 103 num_clients_ = 1; |
| 99 break; | 104 break; |
| 100 } | 105 } |
| 101 case TWO_CLIENT: { | 106 case TWO_CLIENT: { |
| 102 num_clients_ = 2; | 107 num_clients_ = 2; |
| 103 break; | 108 break; |
| 104 } | 109 } |
| 105 case MULTIPLE_CLIENT: { | 110 case MULTIPLE_CLIENT: { |
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 425 const net::ProxyConfig& proxy_config) { | 430 const net::ProxyConfig& proxy_config) { |
| 426 base::WaitableEvent done(false, false); | 431 base::WaitableEvent done(false, false); |
| 427 BrowserThread::PostTask( | 432 BrowserThread::PostTask( |
| 428 BrowserThread::IO, | 433 BrowserThread::IO, |
| 429 FROM_HERE, | 434 FROM_HERE, |
| 430 new SetProxyConfigTask(&done, | 435 new SetProxyConfigTask(&done, |
| 431 context_getter, | 436 context_getter, |
| 432 proxy_config)); | 437 proxy_config)); |
| 433 done.Wait(); | 438 done.Wait(); |
| 434 } | 439 } |
| OLD | NEW |