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 "ash/common/material_design/material_design_controller.h" |
7 #include "base/location.h" | 8 #include "base/location.h" |
8 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
9 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
10 #include "base/threading/thread_task_runner_handle.h" | 11 #include "base/threading/thread_task_runner_handle.h" |
11 #include "build/build_config.h" | 12 #include "build/build_config.h" |
12 #include "chrome/browser/profiles/profile_destroyer.h" | 13 #include "chrome/browser/profiles/profile_destroyer.h" |
13 #include "chrome/browser/ui/browser.h" | 14 #include "chrome/browser/ui/browser.h" |
14 #include "chrome/browser/ui/browser_navigator.h" | 15 #include "chrome/browser/ui/browser_navigator.h" |
15 #include "chrome/browser/ui/browser_navigator_params.h" | 16 #include "chrome/browser/ui/browser_navigator_params.h" |
16 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 17 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 } | 49 } |
49 | 50 |
50 void BrowserWithTestWindowTest::SetUp() { | 51 void BrowserWithTestWindowTest::SetUp() { |
51 testing::Test::SetUp(); | 52 testing::Test::SetUp(); |
52 #if defined(OS_CHROMEOS) | 53 #if defined(OS_CHROMEOS) |
53 // TODO(jamescook): Windows Ash support. This will require refactoring | 54 // TODO(jamescook): Windows Ash support. This will require refactoring |
54 // AshTestHelper and AuraTestHelper so they can be used at the same time, | 55 // AshTestHelper and AuraTestHelper so they can be used at the same time, |
55 // perhaps by AshTestHelper owning an AuraTestHelper. | 56 // perhaps by AshTestHelper owning an AuraTestHelper. |
56 ash_test_helper_.reset(new ash::test::AshTestHelper( | 57 ash_test_helper_.reset(new ash::test::AshTestHelper( |
57 base::MessageLoopForUI::current())); | 58 base::MessageLoopForUI::current())); |
58 ash_test_helper_->SetUp(true); | 59 ash_test_helper_->SetUp(true, |
| 60 ash::MaterialDesignController::Mode::UNINITIALIZED); |
59 #elif defined(TOOLKIT_VIEWS) | 61 #elif defined(TOOLKIT_VIEWS) |
60 views_test_helper_.reset(new views::ScopedViewsTestHelper()); | 62 views_test_helper_.reset(new views::ScopedViewsTestHelper()); |
61 #endif | 63 #endif |
62 #if defined(TOOLKIT_VIEWS) | 64 #if defined(TOOLKIT_VIEWS) |
63 SetConstrainedWindowViewsClient(CreateChromeConstrainedWindowViewsClient()); | 65 SetConstrainedWindowViewsClient(CreateChromeConstrainedWindowViewsClient()); |
64 #endif | 66 #endif |
65 | 67 |
66 // Subclasses can provide their own Profile. | 68 // Subclasses can provide their own Profile. |
67 profile_ = CreateProfile(); | 69 profile_ = CreateProfile(); |
68 // Subclasses can provide their own test BrowserWindow. If they return NULL | 70 // Subclasses can provide their own test BrowserWindow. If they return NULL |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 Browser::CreateParams params(profile); | 229 Browser::CreateParams params(profile); |
228 if (hosted_app) { | 230 if (hosted_app) { |
229 params = Browser::CreateParams::CreateForApp( | 231 params = Browser::CreateParams::CreateForApp( |
230 "Test", true /* trusted_source */, gfx::Rect(), profile); | 232 "Test", true /* trusted_source */, gfx::Rect(), profile); |
231 } else { | 233 } else { |
232 params.type = browser_type; | 234 params.type = browser_type; |
233 } | 235 } |
234 params.window = browser_window; | 236 params.window = browser_window; |
235 return new Browser(params); | 237 return new Browser(params); |
236 } | 238 } |
OLD | NEW |