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

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

Issue 11416251: Desktop aura: Continue threading context through views. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix erroneously removed line from NWWin tests. Created 8 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/view_unittest.cc » ('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/views/test/views_test_base.h" 5 #include "ui/views/test/views_test_base.h"
6 6
7 #include "base/run_loop.h" 7 #include "base/run_loop.h"
8 #include "ui/base/clipboard/clipboard.h" 8 #include "ui/base/clipboard/clipboard.h"
9 9
10 #if defined(USE_AURA) 10 #if defined(USE_AURA)
11 #include "ui/aura/env.h" 11 #include "ui/aura/env.h"
12 #include "ui/aura/root_window.h"
12 #include "ui/aura/test/aura_test_helper.h" 13 #include "ui/aura/test/aura_test_helper.h"
13 #endif 14 #endif
14 15
15 namespace views { 16 namespace views {
16 17
17 ViewsTestBase::ViewsTestBase() 18 ViewsTestBase::ViewsTestBase()
18 : setup_called_(false), 19 : setup_called_(false),
19 teardown_called_(false) { 20 teardown_called_(false) {
20 } 21 }
21 22
(...skipping 30 matching lines...) Expand all
52 } 53 }
53 54
54 void ViewsTestBase::RunPendingMessages() { 55 void ViewsTestBase::RunPendingMessages() {
55 base::RunLoop run_loop; 56 base::RunLoop run_loop;
56 #if defined(USE_AURA) 57 #if defined(USE_AURA)
57 run_loop.set_dispatcher(aura::Env::GetInstance()->GetDispatcher()); 58 run_loop.set_dispatcher(aura::Env::GetInstance()->GetDispatcher());
58 #endif 59 #endif
59 run_loop.RunUntilIdle(); 60 run_loop.RunUntilIdle();
60 } 61 }
61 62
63 Widget::InitParams ViewsTestBase::CreateParams(
64 Widget::InitParams::Type type) {
65 Widget::InitParams params(type);
66 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
67 #if defined(USE_AURA)
68 params.context = aura_test_helper_->root_window();
69 #endif
70 return params;
71 }
72
62 } // namespace views 73 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/test/views_test_base.h ('k') | ui/views/view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698