Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(52)

Side by Side Diff: chrome/browser/sync/test/integration/sync_test.cc

Issue 16174003: Make all tests use GetActiveDesktop() instead of hardcoding HOST_DESKTOP_TYPE_NATIVE. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_manager_unittest.cc ('k') | chrome/browser/ui/browser_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698