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

Side by Side Diff: ash/test/ash_test_helper.cc

Issue 37733003: Make GetRootWindow() return a Window instead of a RootWindow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « ash/test/ash_test_helper.h ('k') | ash/test/test_launcher_item_delegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "ash/test/ash_test_helper.h" 5 #include "ash/test/ash_test_helper.h"
6 6
7 #include "ash/accelerators/accelerator_controller.h" 7 #include "ash/accelerators/accelerator_controller.h"
8 #include "ash/ash_switches.h" 8 #include "ash/ash_switches.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/test/display_manager_test_api.h" 10 #include "ash/test/display_manager_test_api.h"
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 CHECK(!views::corewm::ScopedCaptureClient::IsActive()); 121 CHECK(!views::corewm::ScopedCaptureClient::IsActive());
122 } 122 }
123 123
124 void AshTestHelper::RunAllPendingInMessageLoop() { 124 void AshTestHelper::RunAllPendingInMessageLoop() {
125 DCHECK(base::MessageLoopForUI::current() == message_loop_); 125 DCHECK(base::MessageLoopForUI::current() == message_loop_);
126 aura::Env::CreateInstance(); 126 aura::Env::CreateInstance();
127 base::RunLoop run_loop(aura::Env::GetInstance()->GetDispatcher()); 127 base::RunLoop run_loop(aura::Env::GetInstance()->GetDispatcher());
128 run_loop.RunUntilIdle(); 128 run_loop.RunUntilIdle();
129 } 129 }
130 130
131 aura::RootWindow* AshTestHelper::CurrentContext() { 131 aura::Window* AshTestHelper::CurrentContext() {
132 aura::RootWindow* root_window = Shell::GetTargetRootWindow(); 132 aura::Window* root_window = Shell::GetTargetRootWindow();
133 if (!root_window) 133 if (!root_window)
134 root_window = Shell::GetPrimaryRootWindow(); 134 root_window = Shell::GetPrimaryRootWindow();
135 DCHECK(root_window); 135 DCHECK(root_window);
136 return root_window; 136 return root_window;
137 } 137 }
138 138
139 } // namespace test 139 } // namespace test
140 } // namespace ash 140 } // namespace ash
OLDNEW
« no previous file with comments | « ash/test/ash_test_helper.h ('k') | ash/test/test_launcher_item_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698