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

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

Issue 2186363002: Set Ash material design mode in tests properly (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added a CHECK Created 4 years, 4 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
« no previous file with comments | « ash/wm/overview/window_selector_unittest.cc ('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/browser_with_test_window_test.h" 5 #include "chrome/test/base/browser_with_test_window_test.h"
6 6
7 #include "base/location.h" 7 #include "base/location.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "base/single_thread_task_runner.h" 9 #include "base/single_thread_task_runner.h"
10 #include "base/threading/thread_task_runner_handle.h" 10 #include "base/threading/thread_task_runner_handle.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 } 48 }
49 49
50 void BrowserWithTestWindowTest::SetUp() { 50 void BrowserWithTestWindowTest::SetUp() {
51 testing::Test::SetUp(); 51 testing::Test::SetUp();
52 #if defined(OS_CHROMEOS) 52 #if defined(OS_CHROMEOS)
53 // TODO(jamescook): Windows Ash support. This will require refactoring 53 // TODO(jamescook): Windows Ash support. This will require refactoring
54 // AshTestHelper and AuraTestHelper so they can be used at the same time, 54 // AshTestHelper and AuraTestHelper so they can be used at the same time,
55 // perhaps by AshTestHelper owning an AuraTestHelper. 55 // perhaps by AshTestHelper owning an AuraTestHelper.
56 ash_test_helper_.reset(new ash::test::AshTestHelper( 56 ash_test_helper_.reset(new ash::test::AshTestHelper(
57 base::MessageLoopForUI::current())); 57 base::MessageLoopForUI::current()));
58 ash_test_helper_->SetUp(true); 58 ash_test_helper_->SetUp(true,
59 ash::MaterialDesignController::Mode::UNINITIALIZED);
Lei Zhang 2016/07/29 20:43:57 Please IWYU and #include ash/common/material_desig
mohsen 2016/07/29 23:59:50 Done.
59 #elif defined(TOOLKIT_VIEWS) 60 #elif defined(TOOLKIT_VIEWS)
60 views_test_helper_.reset(new views::ScopedViewsTestHelper()); 61 views_test_helper_.reset(new views::ScopedViewsTestHelper());
61 #endif 62 #endif
62 #if defined(TOOLKIT_VIEWS) 63 #if defined(TOOLKIT_VIEWS)
63 SetConstrainedWindowViewsClient(CreateChromeConstrainedWindowViewsClient()); 64 SetConstrainedWindowViewsClient(CreateChromeConstrainedWindowViewsClient());
64 #endif 65 #endif
65 66
66 // Subclasses can provide their own Profile. 67 // Subclasses can provide their own Profile.
67 profile_ = CreateProfile(); 68 profile_ = CreateProfile();
68 // Subclasses can provide their own test BrowserWindow. If they return NULL 69 // Subclasses can provide their own test BrowserWindow. If they return NULL
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 Browser::CreateParams params(profile); 228 Browser::CreateParams params(profile);
228 if (hosted_app) { 229 if (hosted_app) {
229 params = Browser::CreateParams::CreateForApp( 230 params = Browser::CreateParams::CreateForApp(
230 "Test", true /* trusted_source */, gfx::Rect(), profile); 231 "Test", true /* trusted_source */, gfx::Rect(), profile);
231 } else { 232 } else {
232 params.type = browser_type; 233 params.type = browser_type;
233 } 234 }
234 params.window = browser_window; 235 params.window = browser_window;
235 return new Browser(params); 236 return new Browser(params);
236 } 237 }
OLDNEW
« no previous file with comments | « ash/wm/overview/window_selector_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698