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

Side by Side Diff: chrome/test/base/chrome_render_view_host_test_harness.cc

Issue 12502017: signin: pull basic SigninManager functionality into new SigninManagerBase class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: deal with new enterprise_platform_keys_private_api Created 7 years, 8 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
« no previous file with comments | « chrome/chrome_tests_unit.gypi ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/test/base/chrome_render_view_host_test_harness.h" 5 #include "chrome/test/base/chrome_render_view_host_test_harness.h"
6 6
7 #include "chrome/browser/signin/fake_signin_manager.h" 7 #include "chrome/browser/signin/fake_signin_manager.h"
8 #include "chrome/browser/signin/signin_manager_factory.h" 8 #include "chrome/browser/signin/signin_manager_factory.h"
9 #include "chrome/test/base/testing_profile.h" 9 #include "chrome/test/base/testing_profile.h"
10 10
(...skipping 18 matching lines...) Expand all
29 29
30 TestingProfile* ChromeRenderViewHostTestHarness::profile() { 30 TestingProfile* ChromeRenderViewHostTestHarness::profile() {
31 return static_cast<TestingProfile*>(browser_context_.get()); 31 return static_cast<TestingProfile*>(browser_context_.get());
32 } 32 }
33 33
34 RenderViewHostTester* ChromeRenderViewHostTestHarness::rvh_tester() { 34 RenderViewHostTester* ChromeRenderViewHostTestHarness::rvh_tester() {
35 return RenderViewHostTester::For(rvh()); 35 return RenderViewHostTester::For(rvh());
36 } 36 }
37 37
38 static ProfileKeyedService* BuildSigninManagerFake(Profile* profile) { 38 static ProfileKeyedService* BuildSigninManagerFake(Profile* profile) {
39 #if defined (OS_CHROMEOS)
40 return new FakeSigninManagerBase(profile);
41 #else
39 return new FakeSigninManager(profile); 42 return new FakeSigninManager(profile);
43 #endif
40 } 44 }
41 45
42 void ChromeRenderViewHostTestHarness::SetUp() { 46 void ChromeRenderViewHostTestHarness::SetUp() {
43 Profile* profile = Profile::FromBrowserContext(browser_context_.get()); 47 Profile* profile = Profile::FromBrowserContext(browser_context_.get());
44 if (!profile) { 48 if (!profile) {
45 profile = new TestingProfile(); 49 profile = new TestingProfile();
46 browser_context_.reset(profile); 50 browser_context_.reset(profile);
47 } 51 }
48 SigninManagerFactory::GetInstance()->SetTestingFactory( 52 SigninManagerFactory::GetInstance()->SetTestingFactory(
49 profile, BuildSigninManagerFake); 53 profile, BuildSigninManagerFake);
50 RenderViewHostTestHarness::SetUp(); 54 RenderViewHostTestHarness::SetUp();
51 } 55 }
52 56
53 void ChromeRenderViewHostTestHarness::TearDown() { 57 void ChromeRenderViewHostTestHarness::TearDown() {
54 RenderViewHostTestHarness::TearDown(); 58 RenderViewHostTestHarness::TearDown();
55 #if defined(USE_ASH) 59 #if defined(USE_ASH)
56 ash::Shell::DeleteInstance(); 60 ash::Shell::DeleteInstance();
57 #endif 61 #endif
58 #if defined(USE_AURA) 62 #if defined(USE_AURA)
59 aura::Env::DeleteInstance(); 63 aura::Env::DeleteInstance();
60 #endif 64 #endif
61 } 65 }
OLDNEW
« no previous file with comments | « chrome/chrome_tests_unit.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698