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 "chrome/browser/tabs/tab_strip_model.h" | 7 #include "chrome/browser/tabs/tab_strip_model.h" |
8 #include "chrome/browser/ui/browser_navigator.h" | 8 #include "chrome/browser/ui/browser_navigator.h" |
9 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 9 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
10 #include "chrome/common/render_messages.h" | 10 #include "chrome/common/render_messages.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 void BrowserWithTestWindowTest::SetUp() { | 42 void BrowserWithTestWindowTest::SetUp() { |
43 testing::Test::SetUp(); | 43 testing::Test::SetUp(); |
44 | 44 |
45 profile_.reset(CreateProfile()); | 45 profile_.reset(CreateProfile()); |
46 browser_.reset(new Browser(Browser::TYPE_TABBED, profile())); | 46 browser_.reset(new Browser(Browser::TYPE_TABBED, profile())); |
47 window_.reset(new TestBrowserWindow(browser())); | 47 window_.reset(new TestBrowserWindow(browser())); |
48 browser_->SetWindowForTesting(window_.get()); | 48 browser_->SetWindowForTesting(window_.get()); |
49 #if defined(USE_AURA) | 49 #if defined(USE_AURA) |
50 aura::Env::GetInstance()->SetMonitorManager(new aura::SingleMonitorManager); | 50 aura::Env::GetInstance()->SetMonitorManager(new aura::SingleMonitorManager); |
51 root_window_.reset(aura::MonitorManager::CreateRootWindowForPrimaryMonitor()); | 51 root_window_.reset(aura::MonitorManager::CreateRootWindowForPrimaryMonitor()); |
52 gfx::Screen::SetInstance(new aura::TestScreen(root_window_.get())); | 52 gfx::Screen::SetInstance(new aura::TestSc |
| 53 reen(root_window_.get())); |
53 test_activation_client_.reset( | 54 test_activation_client_.reset( |
54 new aura::test::TestActivationClient(root_window_.get())); | 55 new aura::test::TestActivationClient(root_window_.get())); |
55 test_stacking_client_.reset( | 56 test_stacking_client_.reset( |
56 new aura::test::TestStackingClient(root_window_.get())); | 57 new aura::test::TestStackingClient(root_window_.get())); |
57 #endif // USE_AURA | 58 #endif // USE_AURA |
58 } | 59 } |
59 | 60 |
60 void BrowserWithTestWindowTest::TearDown() { | 61 void BrowserWithTestWindowTest::TearDown() { |
61 testing::Test::TearDown(); | 62 testing::Test::TearDown(); |
62 #if defined(USE_AURA) | 63 #if defined(USE_AURA) |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 // Make sure we close all tabs, otherwise Browser isn't happy in its | 145 // Make sure we close all tabs, otherwise Browser isn't happy in its |
145 // destructor. | 146 // destructor. |
146 browser()->CloseAllTabs(); | 147 browser()->CloseAllTabs(); |
147 browser_.reset(NULL); | 148 browser_.reset(NULL); |
148 window_.reset(NULL); | 149 window_.reset(NULL); |
149 } | 150 } |
150 | 151 |
151 TestingProfile* BrowserWithTestWindowTest::CreateProfile() { | 152 TestingProfile* BrowserWithTestWindowTest::CreateProfile() { |
152 return new TestingProfile(); | 153 return new TestingProfile(); |
153 } | 154 } |
OLD | NEW |