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

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

Issue 273073002: Changes code using Compositor to pass in ContextFactory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tooltip on chromeos Created 6 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 | 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 #include "ui/aura/window_event_dispatcher.h" 10 #include "ui/aura/window_event_dispatcher.h"
11 #include "ui/aura/window_tree_host.h" 11 #include "ui/aura/window_tree_host.h"
12 12
13 namespace base { 13 namespace base {
14 class MessageLoopForUI; 14 class MessageLoopForUI;
15 } 15 }
16 16
17 namespace ui { 17 namespace ui {
18 class ContextFactory;
18 class InputMethod; 19 class InputMethod;
19 class ScopedAnimationDurationScaleMode; 20 class ScopedAnimationDurationScaleMode;
20 } 21 }
21 22
22 namespace aura { 23 namespace aura {
23 class TestScreen; 24 class TestScreen;
24 namespace client { 25 namespace client {
25 class DefaultCaptureClient; 26 class DefaultCaptureClient;
26 class FocusClient; 27 class FocusClient;
27 } 28 }
28 namespace test { 29 namespace test {
29 class TestWindowTreeClient; 30 class TestWindowTreeClient;
30 31
31 // A helper class owned by tests that does common initialization required for 32 // A helper class owned by tests that does common initialization required for
32 // Aura use. This class creates a root window with clients and other objects 33 // Aura use. This class creates a root window with clients and other objects
33 // that are necessary to run test on Aura. 34 // that are necessary to run test on Aura.
34 class AuraTestHelper { 35 class AuraTestHelper {
35 public: 36 public:
36 explicit AuraTestHelper(base::MessageLoopForUI* message_loop); 37 explicit AuraTestHelper(base::MessageLoopForUI* message_loop);
37 ~AuraTestHelper(); 38 ~AuraTestHelper();
38 39
39 // Creates and initializes (shows and sizes) the RootWindow for use in tests. 40 // Creates and initializes (shows and sizes) the RootWindow for use in tests.
40 void SetUp(); 41 void SetUp(ui::ContextFactory* context_factory);
41 42
42 // Clean up objects that are created for tests. This also deletes the Env 43 // Clean up objects that are created for tests. This also deletes the Env
43 // object. 44 // object.
44 void TearDown(); 45 void TearDown();
45 46
46 // Flushes message loop. 47 // Flushes message loop.
47 void RunAllPendingInMessageLoop(); 48 void RunAllPendingInMessageLoop();
48 49
49 Window* root_window() { return host_->window(); } 50 Window* root_window() { return host_->window(); }
50 ui::EventProcessor* event_processor() { return host_->event_processor(); } 51 ui::EventProcessor* event_processor() { return host_->event_processor(); }
(...skipping 14 matching lines...) Expand all
65 scoped_ptr<TestScreen> test_screen_; 66 scoped_ptr<TestScreen> test_screen_;
66 scoped_ptr<ui::ScopedAnimationDurationScaleMode> zero_duration_mode_; 67 scoped_ptr<ui::ScopedAnimationDurationScaleMode> zero_duration_mode_;
67 68
68 DISALLOW_COPY_AND_ASSIGN(AuraTestHelper); 69 DISALLOW_COPY_AND_ASSIGN(AuraTestHelper);
69 }; 70 };
70 71
71 } // namespace test 72 } // namespace test
72 } // namespace aura 73 } // namespace aura
73 74
74 #endif // UI_AURA_TEST_AURA_TEST_HELPER_H_ 75 #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