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

Side by Side Diff: ui/aura/test/aura_test_base.cc

Issue 9616045: Aura/Ash split: Move ScreenAura to ash::ScreenAsh. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use a separate aura::TestScreen in tests instead, partially reverting to patchset 2 Created 8 years, 9 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 | « ui/aura/screen_aura.cc ('k') | ui/aura/test/test_screen.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 (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 "ui/aura/test/aura_test_base.h" 5 #include "ui/aura/test/aura_test_base.h"
6 6
7 #include "ui/aura/root_window.h" 7 #include "ui/aura/root_window.h"
8 #include "ui/aura/test/test_screen.h"
8 #include "ui/aura/test/test_stacking_client.h" 9 #include "ui/aura/test/test_stacking_client.h"
9 10
10 namespace aura { 11 namespace aura {
11 namespace test { 12 namespace test {
12 13
13 AuraTestBase::AuraTestBase() { 14 AuraTestBase::AuraTestBase() {
14 } 15 }
15 16
16 AuraTestBase::~AuraTestBase() { 17 AuraTestBase::~AuraTestBase() {
17 } 18 }
18 19
19 void AuraTestBase::SetUp() { 20 void AuraTestBase::SetUp() {
20 testing::Test::SetUp(); 21 testing::Test::SetUp();
21 root_window_.reset(new aura::RootWindow); 22 root_window_.reset(new aura::RootWindow);
23 gfx::Screen::SetInstance(new aura::TestScreen(root_window_.get()));
22 helper_.InitRootWindow(root_window()); 24 helper_.InitRootWindow(root_window());
23 helper_.SetUp(); 25 helper_.SetUp();
24 stacking_client_.reset(new TestStackingClient(root_window())); 26 stacking_client_.reset(new TestStackingClient(root_window()));
25 } 27 }
26 28
27 void AuraTestBase::TearDown() { 29 void AuraTestBase::TearDown() {
28 // Flush the message loop because we have pending release tasks 30 // Flush the message loop because we have pending release tasks
29 // and these tasks if un-executed would upset Valgrind. 31 // and these tasks if un-executed would upset Valgrind.
30 RunAllPendingInMessageLoop(); 32 RunAllPendingInMessageLoop();
31 33
32 stacking_client_.reset(); 34 stacking_client_.reset();
33 helper_.TearDown(); 35 helper_.TearDown();
34 root_window_.reset(); 36 root_window_.reset();
35 testing::Test::TearDown(); 37 testing::Test::TearDown();
36 } 38 }
37 39
38 void AuraTestBase::RunAllPendingInMessageLoop() { 40 void AuraTestBase::RunAllPendingInMessageLoop() {
39 helper_.RunAllPendingInMessageLoop(root_window()); 41 helper_.RunAllPendingInMessageLoop(root_window());
40 } 42 }
41 43
42 } // namespace test 44 } // namespace test
43 } // namespace aura 45 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/screen_aura.cc ('k') | ui/aura/test/test_screen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698