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 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 return (verifier_ != NULL); | 299 return (verifier_ != NULL); |
300 } | 300 } |
301 | 301 |
302 void SyncTest::InitializeInstance(int index) { | 302 void SyncTest::InitializeInstance(int index) { |
303 profiles_[index] = MakeProfile( | 303 profiles_[index] = MakeProfile( |
304 base::StringPrintf(FILE_PATH_LITERAL("Profile%d"), index)); | 304 base::StringPrintf(FILE_PATH_LITERAL("Profile%d"), index)); |
305 EXPECT_FALSE(GetProfile(index) == NULL) << "Could not create Profile " | 305 EXPECT_FALSE(GetProfile(index) == NULL) << "Could not create Profile " |
306 << index << "."; | 306 << index << "."; |
307 | 307 |
308 browsers_[index] = new Browser(Browser::CreateParams( | 308 browsers_[index] = new Browser(Browser::CreateParams( |
309 GetProfile(index), chrome::HOST_DESKTOP_TYPE_NATIVE)); | 309 GetProfile(index), chrome::GetActiveDesktop())); |
310 EXPECT_FALSE(GetBrowser(index) == NULL) << "Could not create Browser " | 310 EXPECT_FALSE(GetBrowser(index) == NULL) << "Could not create Browser " |
311 << index << "."; | 311 << index << "."; |
312 | 312 |
313 // Make sure the ProfileSyncService has been created before creating the | 313 // Make sure the ProfileSyncService has been created before creating the |
314 // ProfileSyncServiceHarness - some tests expect the ProfileSyncService to | 314 // ProfileSyncServiceHarness - some tests expect the ProfileSyncService to |
315 // already exist. | 315 // already exist. |
316 ProfileSyncServiceFactory::GetForProfile(GetProfile(index)); | 316 ProfileSyncServiceFactory::GetForProfile(GetProfile(index)); |
317 | 317 |
318 clients_[index] = new ProfileSyncServiceHarness(GetProfile(index), | 318 clients_[index] = new ProfileSyncServiceHarness(GetProfile(index), |
319 username_, | 319 username_, |
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
823 | 823 |
824 void SyncTest::SetProxyConfig(net::URLRequestContextGetter* context_getter, | 824 void SyncTest::SetProxyConfig(net::URLRequestContextGetter* context_getter, |
825 const net::ProxyConfig& proxy_config) { | 825 const net::ProxyConfig& proxy_config) { |
826 base::WaitableEvent done(false, false); | 826 base::WaitableEvent done(false, false); |
827 BrowserThread::PostTask( | 827 BrowserThread::PostTask( |
828 BrowserThread::IO, FROM_HERE, | 828 BrowserThread::IO, FROM_HERE, |
829 base::Bind(&SetProxyConfigCallback, &done, | 829 base::Bind(&SetProxyConfigCallback, &done, |
830 make_scoped_refptr(context_getter), proxy_config)); | 830 make_scoped_refptr(context_getter), proxy_config)); |
831 done.Wait(); | 831 done.Wait(); |
832 } | 832 } |
OLD | NEW |