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/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/browser_process.h" | 7 #include "chrome/browser/browser_process.h" |
8 #include "chrome/browser/signin/fake_signin_manager.h" | 8 #include "chrome/browser/signin/fake_signin_manager.h" |
9 #include "chrome/browser/signin/signin_manager_factory.h" | 9 #include "chrome/browser/signin/signin_manager_factory.h" |
10 #include "chrome/test/base/testing_profile.h" | 10 #include "chrome/test/base/testing_profile.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 } | 29 } |
30 | 30 |
31 TestingProfile* ChromeRenderViewHostTestHarness::profile() { | 31 TestingProfile* ChromeRenderViewHostTestHarness::profile() { |
32 return static_cast<TestingProfile*>(browser_context_.get()); | 32 return static_cast<TestingProfile*>(browser_context_.get()); |
33 } | 33 } |
34 | 34 |
35 RenderViewHostTester* ChromeRenderViewHostTestHarness::rvh_tester() { | 35 RenderViewHostTester* ChromeRenderViewHostTestHarness::rvh_tester() { |
36 return RenderViewHostTester::For(rvh()); | 36 return RenderViewHostTester::For(rvh()); |
37 } | 37 } |
38 | 38 |
39 static ProfileKeyedService* BuildSigninManagerFake( | 39 static BrowserContextKeyedService* BuildSigninManagerFake( |
40 content::BrowserContext* context) { | 40 content::BrowserContext* context) { |
41 Profile* profile = static_cast<Profile*>(context); | 41 Profile* profile = static_cast<Profile*>(context); |
42 #if defined (OS_CHROMEOS) | 42 #if defined (OS_CHROMEOS) |
43 SigninManagerBase* signin = new SigninManagerBase(); | 43 SigninManagerBase* signin = new SigninManagerBase(); |
44 signin->Initialize(profile, NULL); | 44 signin->Initialize(profile, NULL); |
45 return signin; | 45 return signin; |
46 #else | 46 #else |
47 FakeSigninManager* manager = new FakeSigninManager(profile); | 47 FakeSigninManager* manager = new FakeSigninManager(profile); |
48 manager->Initialize(profile, g_browser_process->local_state()); | 48 manager->Initialize(profile, g_browser_process->local_state()); |
49 return manager; | 49 return manager; |
(...skipping 13 matching lines...) Expand all Loading... |
63 | 63 |
64 void ChromeRenderViewHostTestHarness::TearDown() { | 64 void ChromeRenderViewHostTestHarness::TearDown() { |
65 RenderViewHostTestHarness::TearDown(); | 65 RenderViewHostTestHarness::TearDown(); |
66 #if defined(USE_ASH) | 66 #if defined(USE_ASH) |
67 ash::Shell::DeleteInstance(); | 67 ash::Shell::DeleteInstance(); |
68 #endif | 68 #endif |
69 #if defined(USE_AURA) | 69 #if defined(USE_AURA) |
70 aura::Env::DeleteInstance(); | 70 aura::Env::DeleteInstance(); |
71 #endif | 71 #endif |
72 } | 72 } |
OLD | NEW |