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

Side by Side Diff: ui/views/test/views_test_base.cc

Issue 8894018: Move the concept of Activation to the Shell. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years 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/views/test/views_test_base.h ('k') | ui/views/widget/native_widget_aura.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/views/test/views_test_base.h" 5 #include "ui/views/test/views_test_base.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <ole2.h> 8 #include <ole2.h>
9 #endif 9 #endif
10 10
11 #if defined(USE_AURA) 11 #if defined(USE_AURA)
12 #include "ui/aura/root_window.h" 12 #include "ui/aura/root_window.h"
13 #include "ui/aura/test/test_activation_client.h"
13 #include "ui/aura/test/test_stacking_client.h" 14 #include "ui/aura/test/test_stacking_client.h"
14 #endif 15 #endif
15 16
16 namespace views { 17 namespace views {
17 18
18 ViewsTestBase::ViewsTestBase() 19 ViewsTestBase::ViewsTestBase()
19 : setup_called_(false), 20 : setup_called_(false),
20 teardown_called_(false) { 21 teardown_called_(false) {
21 #if defined(OS_WIN) 22 #if defined(OS_WIN)
22 OleInitialize(NULL); 23 OleInitialize(NULL);
23 #endif 24 #endif
24 #if defined(USE_AURA) 25 #if defined(USE_AURA)
26 test_activation_client_.reset(new aura::test::TestActivationClient);
25 new aura::test::TestStackingClient; 27 new aura::test::TestStackingClient;
26 #endif 28 #endif
27 } 29 }
28 30
29 ViewsTestBase::~ViewsTestBase() { 31 ViewsTestBase::~ViewsTestBase() {
30 #if defined(OS_WIN) 32 #if defined(OS_WIN)
31 OleUninitialize(); 33 OleUninitialize();
32 #endif 34 #endif
33 CHECK(setup_called_) 35 CHECK(setup_called_)
34 << "You have overridden SetUp but never called super class's SetUp"; 36 << "You have overridden SetUp but never called super class's SetUp";
(...skipping 20 matching lines...) Expand all
55 void ViewsTestBase::RunPendingMessages() { 57 void ViewsTestBase::RunPendingMessages() {
56 #if defined(USE_AURA) 58 #if defined(USE_AURA)
57 message_loop_.RunAllPendingWithDispatcher( 59 message_loop_.RunAllPendingWithDispatcher(
58 aura::RootWindow::GetInstance()->GetDispatcher()); 60 aura::RootWindow::GetInstance()->GetDispatcher());
59 #else 61 #else
60 message_loop_.RunAllPending(); 62 message_loop_.RunAllPending();
61 #endif 63 #endif
62 } 64 }
63 65
64 } // namespace views 66 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/test/views_test_base.h ('k') | ui/views/widget/native_widget_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698