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

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

Issue 2849423002: Use ScopedTaskEnvironment instead of MessageLoopForUI in ui/aura/test/. (Closed)
Patch Set: add-deps Created 3 years, 7 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
« no previous file with comments | « ui/aura/test/aura_test_base.cc ('k') | ui/aura/test/aura_test_helper.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 #ifndef UI_AURA_TEST_AURA_TEST_HELPER_H_ 5 #ifndef UI_AURA_TEST_AURA_TEST_HELPER_H_
6 #define UI_AURA_TEST_AURA_TEST_HELPER_H_ 6 #define UI_AURA_TEST_AURA_TEST_HELPER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "ui/aura/env.h" 11 #include "ui/aura/env.h"
12 #include "ui/aura/window_event_dispatcher.h" 12 #include "ui/aura/window_event_dispatcher.h"
13 #include "ui/aura/window_tree_host.h" 13 #include "ui/aura/window_tree_host.h"
14 14
15 namespace base {
16 class MessageLoopForUI;
17 }
18
19 namespace ui { 15 namespace ui {
20 class ContextFactory; 16 class ContextFactory;
21 class ScopedAnimationDurationScaleMode; 17 class ScopedAnimationDurationScaleMode;
22 } 18 }
23 19
24 namespace wm { 20 namespace wm {
25 class WMState; 21 class WMState;
26 } 22 }
27 23
28 namespace aura { 24 namespace aura {
(...skipping 12 matching lines...) Expand all
41 class FocusClient; 37 class FocusClient;
42 } 38 }
43 namespace test { 39 namespace test {
44 class TestWindowParentingClient; 40 class TestWindowParentingClient;
45 41
46 // A helper class owned by tests that does common initialization required for 42 // A helper class owned by tests that does common initialization required for
47 // Aura use. This class creates a root window with clients and other objects 43 // Aura use. This class creates a root window with clients and other objects
48 // that are necessary to run test on Aura. 44 // that are necessary to run test on Aura.
49 class AuraTestHelper { 45 class AuraTestHelper {
50 public: 46 public:
51 explicit AuraTestHelper(base::MessageLoopForUI* message_loop); 47 AuraTestHelper();
52 ~AuraTestHelper(); 48 ~AuraTestHelper();
53 49
54 // Returns the current AuraTestHelper, or nullptr if it's not alive. 50 // Returns the current AuraTestHelper, or nullptr if it's not alive.
55 static AuraTestHelper* GetInstance(); 51 static AuraTestHelper* GetInstance();
56 52
57 // Makes aura target mus with a mock WindowTree (TestWindowTree). Must be 53 // Makes aura target mus with a mock WindowTree (TestWindowTree). Must be
58 // called before SetUp(). 54 // called before SetUp().
59 void EnableMusWithTestWindowTree( 55 void EnableMusWithTestWindowTree(
60 WindowTreeClientDelegate* window_tree_delegate, 56 WindowTreeClientDelegate* window_tree_delegate,
61 WindowManagerDelegate* window_manager_delegate); 57 WindowManagerDelegate* window_manager_delegate);
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 123
128 WindowTreeClient* window_tree_client_ = nullptr; 124 WindowTreeClient* window_tree_client_ = nullptr;
129 125
130 DISALLOW_COPY_AND_ASSIGN(AuraTestHelper); 126 DISALLOW_COPY_AND_ASSIGN(AuraTestHelper);
131 }; 127 };
132 128
133 } // namespace test 129 } // namespace test
134 } // namespace aura 130 } // namespace aura
135 131
136 #endif // UI_AURA_TEST_AURA_TEST_HELPER_H_ 132 #endif // UI_AURA_TEST_AURA_TEST_HELPER_H_
OLDNEW
« no previous file with comments | « ui/aura/test/aura_test_base.cc ('k') | ui/aura/test/aura_test_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698