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

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

Issue 11030017: Add context to gfx::Screen calls in support of simultaneous desktop+ash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix some new gfx::Screen additions Created 8 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
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_helper.h" 5 #include "ui/aura/test/aura_test_helper.h"
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "ui/aura/client/aura_constants.h" 9 #include "ui/aura/client/aura_constants.h"
10 #include "ui/aura/env.h" 10 #include "ui/aura/env.h"
(...skipping 28 matching lines...) Expand all
39 CHECK(setup_called_) 39 CHECK(setup_called_)
40 << "You have overridden SetUp but never called super class's SetUp"; 40 << "You have overridden SetUp but never called super class's SetUp";
41 CHECK(teardown_called_) 41 CHECK(teardown_called_)
42 << "You have overridden TearDown but never called super class's TearDown"; 42 << "You have overridden TearDown but never called super class's TearDown";
43 } 43 }
44 44
45 void AuraTestHelper::SetUp() { 45 void AuraTestHelper::SetUp() {
46 setup_called_ = true; 46 setup_called_ = true;
47 Env::GetInstance()->SetDisplayManager(new SingleDisplayManager); 47 Env::GetInstance()->SetDisplayManager(new SingleDisplayManager);
48 root_window_.reset(aura::DisplayManager::CreateRootWindowForPrimaryDisplay()); 48 root_window_.reset(aura::DisplayManager::CreateRootWindowForPrimaryDisplay());
49 gfx::Screen::SetInstance(new aura::TestScreen(root_window_.get())); 49 gfx::Screen::SetScreenInstance(
50 gfx::SCREEN_TYPE_NATIVE, new aura::TestScreen(root_window_.get()));
50 ui_controls::InstallUIControlsAura(CreateUIControlsAura(root_window_.get())); 51 ui_controls::InstallUIControlsAura(CreateUIControlsAura(root_window_.get()));
51 52
52 focus_manager_.reset(new FocusManager); 53 focus_manager_.reset(new FocusManager);
53 root_window_->set_focus_manager(focus_manager_.get()); 54 root_window_->set_focus_manager(focus_manager_.get());
54 stacking_client_.reset(new TestStackingClient(root_window_.get())); 55 stacking_client_.reset(new TestStackingClient(root_window_.get()));
55 test_activation_client_.reset( 56 test_activation_client_.reset(
56 new test::TestActivationClient(root_window_.get())); 57 new test::TestActivationClient(root_window_.get()));
57 root_window_capture_client_.reset( 58 root_window_capture_client_.reset(
58 new shared::RootWindowCaptureClient(root_window_.get())); 59 new shared::RootWindowCaptureClient(root_window_.get()));
59 test_input_method_.reset(new ui::test::DummyInputMethod); 60 test_input_method_.reset(new ui::test::DummyInputMethod);
(...skipping 21 matching lines...) Expand all
81 #if !defined(OS_MACOSX) 82 #if !defined(OS_MACOSX)
82 // TODO(jbates) crbug.com/134753 Find quitters of this RunLoop and have them 83 // TODO(jbates) crbug.com/134753 Find quitters of this RunLoop and have them
83 // use run_loop.QuitClosure(). 84 // use run_loop.QuitClosure().
84 base::RunLoop run_loop(Env::GetInstance()->GetDispatcher()); 85 base::RunLoop run_loop(Env::GetInstance()->GetDispatcher());
85 run_loop.RunUntilIdle(); 86 run_loop.RunUntilIdle();
86 #endif 87 #endif
87 } 88 }
88 89
89 } // namespace test 90 } // namespace test
90 } // namespace aura 91 } // namespace aura
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698