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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 TemplateURLServiceFactory::GetForProfile(verifier())); | 274 TemplateURLServiceFactory::GetForProfile(verifier())); |
275 return (verifier_ != NULL); | 275 return (verifier_ != NULL); |
276 } | 276 } |
277 | 277 |
278 void SyncTest::InitializeInstance(int index) { | 278 void SyncTest::InitializeInstance(int index) { |
279 profiles_[index] = MakeProfile( | 279 profiles_[index] = MakeProfile( |
280 base::StringPrintf(FILE_PATH_LITERAL("Profile%d"), index)); | 280 base::StringPrintf(FILE_PATH_LITERAL("Profile%d"), index)); |
281 EXPECT_FALSE(GetProfile(index) == NULL) << "Could not create Profile " | 281 EXPECT_FALSE(GetProfile(index) == NULL) << "Could not create Profile " |
282 << index << "."; | 282 << index << "."; |
283 | 283 |
284 browsers_[index] = Browser::Create(GetProfile(index)); | 284 browsers_[index] = new Browser(Browser::CreateParams(GetProfile(index))); |
285 EXPECT_FALSE(GetBrowser(index) == NULL) << "Could not create Browser " | 285 EXPECT_FALSE(GetBrowser(index) == NULL) << "Could not create Browser " |
286 << index << "."; | 286 << index << "."; |
287 | 287 |
288 clients_[index] = new ProfileSyncServiceHarness(GetProfile(index), | 288 clients_[index] = new ProfileSyncServiceHarness(GetProfile(index), |
289 username_, | 289 username_, |
290 password_); | 290 password_); |
291 EXPECT_FALSE(GetClient(index) == NULL) << "Could not create Client " | 291 EXPECT_FALSE(GetClient(index) == NULL) << "Could not create Client " |
292 << index << "."; | 292 << index << "."; |
293 | 293 |
294 ui_test_utils::WaitForBookmarkModelToLoad( | 294 ui_test_utils::WaitForBookmarkModelToLoad( |
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
785 | 785 |
786 void SyncTest::SetProxyConfig(net::URLRequestContextGetter* context_getter, | 786 void SyncTest::SetProxyConfig(net::URLRequestContextGetter* context_getter, |
787 const net::ProxyConfig& proxy_config) { | 787 const net::ProxyConfig& proxy_config) { |
788 base::WaitableEvent done(false, false); | 788 base::WaitableEvent done(false, false); |
789 BrowserThread::PostTask( | 789 BrowserThread::PostTask( |
790 BrowserThread::IO, FROM_HERE, | 790 BrowserThread::IO, FROM_HERE, |
791 base::Bind(&SetProxyConfigCallback, &done, | 791 base::Bind(&SetProxyConfigCallback, &done, |
792 make_scoped_refptr(context_getter), proxy_config)); | 792 make_scoped_refptr(context_getter), proxy_config)); |
793 done.Wait(); | 793 done.Wait(); |
794 } | 794 } |
OLD | NEW |