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

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

Issue 36473003: Rename StackingClient -> WindowTreeClient (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: done. Created 7 years, 1 month 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/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 "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 10
(...skipping 12 matching lines...) Expand all
23 23
24 namespace aura { 24 namespace aura {
25 class RootWindow; 25 class RootWindow;
26 class TestScreen; 26 class TestScreen;
27 namespace client { 27 namespace client {
28 class DefaultActivationClient; 28 class DefaultActivationClient;
29 class DefaultCaptureClient; 29 class DefaultCaptureClient;
30 class FocusClient; 30 class FocusClient;
31 } 31 }
32 namespace test { 32 namespace test {
33 class TestStackingClient; 33 class TestWindowTreeClient;
34 34
35 // A helper class owned by tests that does common initialization required for 35 // A helper class owned by tests that does common initialization required for
36 // Aura use. This class creates a root window with clients and other objects 36 // Aura use. This class creates a root window with clients and other objects
37 // that are necessary to run test on Aura. 37 // that are necessary to run test on Aura.
38 class AuraTestHelper { 38 class AuraTestHelper {
39 public: 39 public:
40 explicit AuraTestHelper(base::MessageLoopForUI* message_loop); 40 explicit AuraTestHelper(base::MessageLoopForUI* message_loop);
41 ~AuraTestHelper(); 41 ~AuraTestHelper();
42 42
43 // Creates and initializes (shows and sizes) the RootWindow for use in tests. 43 // Creates and initializes (shows and sizes) the RootWindow for use in tests.
44 void SetUp(); 44 void SetUp();
45 45
46 // Clean up objects that are created for tests. This also deletes the Env 46 // Clean up objects that are created for tests. This also deletes the Env
47 // object. 47 // object.
48 void TearDown(); 48 void TearDown();
49 49
50 // Flushes message loop. 50 // Flushes message loop.
51 void RunAllPendingInMessageLoop(); 51 void RunAllPendingInMessageLoop();
52 52
53 RootWindow* root_window() { return root_window_.get(); } 53 RootWindow* root_window() { return root_window_.get(); }
54 54
55 TestScreen* test_screen() { return test_screen_.get(); } 55 TestScreen* test_screen() { return test_screen_.get(); }
56 56
57 private: 57 private:
58 base::MessageLoopForUI* message_loop_; 58 base::MessageLoopForUI* message_loop_;
59 bool setup_called_; 59 bool setup_called_;
60 bool teardown_called_; 60 bool teardown_called_;
61 bool owns_root_window_; 61 bool owns_root_window_;
62 scoped_ptr<RootWindow> root_window_; 62 scoped_ptr<RootWindow> root_window_;
63 scoped_ptr<TestStackingClient> stacking_client_; 63 scoped_ptr<TestWindowTreeClient> stacking_client_;
64 scoped_ptr<client::DefaultActivationClient> activation_client_; 64 scoped_ptr<client::DefaultActivationClient> activation_client_;
65 scoped_ptr<client::DefaultCaptureClient> capture_client_; 65 scoped_ptr<client::DefaultCaptureClient> capture_client_;
66 scoped_ptr<ui::InputMethod> test_input_method_; 66 scoped_ptr<ui::InputMethod> test_input_method_;
67 scoped_ptr<client::FocusClient> focus_client_; 67 scoped_ptr<client::FocusClient> focus_client_;
68 scoped_ptr<TestScreen> test_screen_; 68 scoped_ptr<TestScreen> test_screen_;
69 scoped_ptr<ui::ScopedAnimationDurationScaleMode> zero_duration_mode_; 69 scoped_ptr<ui::ScopedAnimationDurationScaleMode> zero_duration_mode_;
70 70
71 #if defined(USE_OZONE) 71 #if defined(USE_OZONE)
72 scoped_ptr<gfx::SurfaceFactoryOzone> surface_factory_; 72 scoped_ptr<gfx::SurfaceFactoryOzone> surface_factory_;
73 #endif 73 #endif
74 74
75 DISALLOW_COPY_AND_ASSIGN(AuraTestHelper); 75 DISALLOW_COPY_AND_ASSIGN(AuraTestHelper);
76 }; 76 };
77 77
78 } // namespace test 78 } // namespace test
79 } // namespace aura 79 } // namespace aura
80 80
81 #endif // UI_AURA_TEST_AURA_TEST_HELPER_H_ 81 #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