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

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

Issue 9689027: MonitorManager to manage multiple monitors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: crash fix 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
« ui/aura/monitor.h ('K') | « ui/aura/screen_aura.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 "ui/aura/test/aura_test_base.h" 5 #include "ui/aura/test/aura_test_base.h"
6 6
7 #include "ui/aura/env.h"
8 #include "ui/aura/monitor_manager.h"
7 #include "ui/aura/root_window.h" 9 #include "ui/aura/root_window.h"
8 #include "ui/aura/test/test_stacking_client.h" 10 #include "ui/aura/test/test_stacking_client.h"
9 11
10 namespace aura { 12 namespace aura {
11 namespace test { 13 namespace test {
12 14
13 AuraTestBase::AuraTestBase() { 15 AuraTestBase::AuraTestBase() {
14 } 16 }
15 17
16 AuraTestBase::~AuraTestBase() { 18 AuraTestBase::~AuraTestBase() {
17 } 19 }
18 20
19 void AuraTestBase::SetUp() { 21 void AuraTestBase::SetUp() {
20 testing::Test::SetUp(); 22 testing::Test::SetUp();
21 root_window_.reset(new aura::RootWindow); 23 root_window_.reset(new aura::RootWindow);
24 Env::GetInstance()->SetMonitorManager(
25 CreateSingleMonitorManager(root_window_.get()));
22 helper_.InitRootWindow(root_window()); 26 helper_.InitRootWindow(root_window());
23 helper_.SetUp(); 27 helper_.SetUp();
24 stacking_client_.reset(new TestStackingClient(root_window())); 28 stacking_client_.reset(new TestStackingClient(root_window()));
25 } 29 }
26 30
27 void AuraTestBase::TearDown() { 31 void AuraTestBase::TearDown() {
28 // Flush the message loop because we have pending release tasks 32 // Flush the message loop because we have pending release tasks
29 // and these tasks if un-executed would upset Valgrind. 33 // and these tasks if un-executed would upset Valgrind.
30 RunAllPendingInMessageLoop(); 34 RunAllPendingInMessageLoop();
31 35
32 stacking_client_.reset(); 36 stacking_client_.reset();
33 helper_.TearDown(); 37 helper_.TearDown();
34 root_window_.reset(); 38 root_window_.reset();
35 testing::Test::TearDown(); 39 testing::Test::TearDown();
36 } 40 }
37 41
38 void AuraTestBase::RunAllPendingInMessageLoop() { 42 void AuraTestBase::RunAllPendingInMessageLoop() {
39 helper_.RunAllPendingInMessageLoop(root_window()); 43 helper_.RunAllPendingInMessageLoop(root_window());
40 } 44 }
41 45
42 } // namespace test 46 } // namespace test
43 } // namespace aura 47 } // namespace aura
OLDNEW
« ui/aura/monitor.h ('K') | « ui/aura/screen_aura.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698