OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/browser/sync/test/integration/sync_test.h" | 5 #include "chrome/browser/sync/test/integration/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/bind.h" | 10 #include "base/bind.h" |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 // Create the required number of sync profiles, browsers and clients. | 267 // Create the required number of sync profiles, browsers and clients. |
268 profiles_.resize(num_clients_); | 268 profiles_.resize(num_clients_); |
269 browsers_.resize(num_clients_); | 269 browsers_.resize(num_clients_); |
270 clients_.resize(num_clients_); | 270 clients_.resize(num_clients_); |
271 for (int i = 0; i < num_clients_; ++i) { | 271 for (int i = 0; i < num_clients_; ++i) { |
272 InitializeInstance(i); | 272 InitializeInstance(i); |
273 } | 273 } |
274 | 274 |
275 // Create the verifier profile. | 275 // Create the verifier profile. |
276 verifier_ = MakeProfile(FILE_PATH_LITERAL("Verifier")); | 276 verifier_ = MakeProfile(FILE_PATH_LITERAL("Verifier")); |
277 ui_test_utils::WaitForBookmarkModelToLoad(verifier()->GetBookmarkModel()); | 277 ui_test_utils::WaitForBookmarkModelToLoad( |
| 278 BookmarkModelFactory::GetForProfile(verifier())); |
278 ui_test_utils::WaitForTemplateURLServiceToLoad( | 279 ui_test_utils::WaitForTemplateURLServiceToLoad( |
279 TemplateURLServiceFactory::GetForProfile(verifier())); | 280 TemplateURLServiceFactory::GetForProfile(verifier())); |
280 return (verifier_ != NULL); | 281 return (verifier_ != NULL); |
281 } | 282 } |
282 | 283 |
283 void SyncTest::InitializeInstance(int index) { | 284 void SyncTest::InitializeInstance(int index) { |
284 profiles_[index] = MakeProfile( | 285 profiles_[index] = MakeProfile( |
285 base::StringPrintf(FILE_PATH_LITERAL("Profile%d"), index)); | 286 base::StringPrintf(FILE_PATH_LITERAL("Profile%d"), index)); |
286 EXPECT_FALSE(GetProfile(index) == NULL) << "Could not create Profile " | 287 EXPECT_FALSE(GetProfile(index) == NULL) << "Could not create Profile " |
287 << index << "."; | 288 << index << "."; |
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
790 | 791 |
791 void SyncTest::SetProxyConfig(net::URLRequestContextGetter* context_getter, | 792 void SyncTest::SetProxyConfig(net::URLRequestContextGetter* context_getter, |
792 const net::ProxyConfig& proxy_config) { | 793 const net::ProxyConfig& proxy_config) { |
793 base::WaitableEvent done(false, false); | 794 base::WaitableEvent done(false, false); |
794 BrowserThread::PostTask( | 795 BrowserThread::PostTask( |
795 BrowserThread::IO, FROM_HERE, | 796 BrowserThread::IO, FROM_HERE, |
796 base::Bind(&SetProxyConfigCallback, &done, | 797 base::Bind(&SetProxyConfigCallback, &done, |
797 make_scoped_refptr(context_getter), proxy_config)); | 798 make_scoped_refptr(context_getter), proxy_config)); |
798 done.Wait(); | 799 done.Wait(); |
799 } | 800 } |
OLD | NEW |