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/browser_with_test_window_test.h" | 5 #include "chrome/test/base/browser_with_test_window_test.h" |
6 | 6 |
7 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
8 #include "chrome/browser/profiles/profile_destroyer.h" | 8 #include "chrome/browser/profiles/profile_destroyer.h" |
9 #include "chrome/browser/ui/browser.h" | 9 #include "chrome/browser/ui/browser.h" |
10 #include "chrome/browser/ui/browser_navigator.h" | 10 #include "chrome/browser/ui/browser_navigator.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 } | 44 } |
45 | 45 |
46 void BrowserWithTestWindowTest::SetUp() { | 46 void BrowserWithTestWindowTest::SetUp() { |
47 testing::Test::SetUp(); | 47 testing::Test::SetUp(); |
48 #if defined(OS_CHROMEOS) | 48 #if defined(OS_CHROMEOS) |
49 // TODO(jamescook): Windows Ash support. This will require refactoring | 49 // TODO(jamescook): Windows Ash support. This will require refactoring |
50 // AshTestHelper and AuraTestHelper so they can be used at the same time, | 50 // AshTestHelper and AuraTestHelper so they can be used at the same time, |
51 // perhaps by AshTestHelper owning an AuraTestHelper. | 51 // perhaps by AshTestHelper owning an AuraTestHelper. |
52 ash_test_helper_.reset(new ash::test::AshTestHelper( | 52 ash_test_helper_.reset(new ash::test::AshTestHelper( |
53 base::MessageLoopForUI::current())); | 53 base::MessageLoopForUI::current())); |
54 ash_test_helper_->SetUp(); | 54 ash_test_helper_->SetUp(true); |
55 #elif defined(USE_AURA) | 55 #elif defined(USE_AURA) |
56 aura_test_helper_.reset(new aura::test::AuraTestHelper( | 56 aura_test_helper_.reset(new aura::test::AuraTestHelper( |
57 base::MessageLoopForUI::current())); | 57 base::MessageLoopForUI::current())); |
58 aura_test_helper_->SetUp(); | 58 aura_test_helper_->SetUp(); |
59 #endif // USE_AURA | 59 #endif // USE_AURA |
60 | 60 |
61 // Subclasses can provide their own Profile. | 61 // Subclasses can provide their own Profile. |
62 profile_.reset(CreateProfile()); | 62 profile_.reset(CreateProfile()); |
63 // Subclasses can provide their own test BrowserWindow. If they return NULL | 63 // Subclasses can provide their own test BrowserWindow. If they return NULL |
64 // then Browser will create the a production BrowserWindow and the subclass | 64 // then Browser will create the a production BrowserWindow and the subclass |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 profile_.reset(NULL); | 182 profile_.reset(NULL); |
183 } | 183 } |
184 | 184 |
185 TestingProfile* BrowserWithTestWindowTest::CreateProfile() { | 185 TestingProfile* BrowserWithTestWindowTest::CreateProfile() { |
186 return new TestingProfile(); | 186 return new TestingProfile(); |
187 } | 187 } |
188 | 188 |
189 BrowserWindow* BrowserWithTestWindowTest::CreateBrowserWindow() { | 189 BrowserWindow* BrowserWithTestWindowTest::CreateBrowserWindow() { |
190 return new TestBrowserWindow(); | 190 return new TestBrowserWindow(); |
191 } | 191 } |
OLD | NEW |