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 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 | 255 |
256 // Start up a sync test server if one is needed. | 256 // Start up a sync test server if one is needed. |
257 SetUpTestServerIfRequired(); | 257 SetUpTestServerIfRequired(); |
258 | 258 |
259 // Create the required number of sync profiles and clients. | 259 // Create the required number of sync profiles and clients. |
260 for (int i = 0; i < num_clients_; ++i) { | 260 for (int i = 0; i < num_clients_; ++i) { |
261 profiles_.push_back(MakeProfile( | 261 profiles_.push_back(MakeProfile( |
262 base::StringPrintf(FILE_PATH_LITERAL("Profile%d"), i))); | 262 base::StringPrintf(FILE_PATH_LITERAL("Profile%d"), i))); |
263 EXPECT_FALSE(GetProfile(i) == NULL) << "GetProfile(" << i << ") failed."; | 263 EXPECT_FALSE(GetProfile(i) == NULL) << "GetProfile(" << i << ") failed."; |
264 clients_.push_back( | 264 clients_.push_back( |
265 new ProfileSyncServiceHarness(GetProfile(i), username_, password_, i)); | 265 new ProfileSyncServiceHarness(GetProfile(i), username_, password_)); |
266 EXPECT_FALSE(GetClient(i) == NULL) << "GetClient(" << i << ") failed."; | 266 EXPECT_FALSE(GetClient(i) == NULL) << "GetClient(" << i << ") failed."; |
267 } | 267 } |
268 | 268 |
269 // Create the verifier profile. | 269 // Create the verifier profile. |
270 verifier_.reset(MakeProfile(FILE_PATH_LITERAL("Verifier"))); | 270 verifier_.reset(MakeProfile(FILE_PATH_LITERAL("Verifier"))); |
271 return (verifier_.get() != NULL); | 271 return (verifier_.get() != NULL); |
272 } | 272 } |
273 | 273 |
274 bool LiveSyncTest::SetupSync() { | 274 bool LiveSyncTest::SetupSync() { |
275 // Create sync profiles and clients if they haven't already been created. | 275 // Create sync profiles and clients if they haven't already been created. |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
510 const net::ProxyConfig& proxy_config) { | 510 const net::ProxyConfig& proxy_config) { |
511 base::WaitableEvent done(false, false); | 511 base::WaitableEvent done(false, false); |
512 BrowserThread::PostTask( | 512 BrowserThread::PostTask( |
513 BrowserThread::IO, | 513 BrowserThread::IO, |
514 FROM_HERE, | 514 FROM_HERE, |
515 new SetProxyConfigTask(&done, | 515 new SetProxyConfigTask(&done, |
516 context_getter, | 516 context_getter, |
517 proxy_config)); | 517 proxy_config)); |
518 done.Wait(); | 518 done.Wait(); |
519 } | 519 } |
OLD | NEW |