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

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

Issue 145293007: ui: No more TestCompositor. Use NullDraw contexts in unit tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: testsnulldraw: Created 6 years, 10 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
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/root_window.h" 10 #include "ui/aura/root_window.h"
(...skipping 19 matching lines...) Expand all
30 30
31 // A helper class owned by tests that does common initialization required for 31 // 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 32 // Aura use. This class creates a root window with clients and other objects
33 // that are necessary to run test on Aura. 33 // that are necessary to run test on Aura.
34 class AuraTestHelper { 34 class AuraTestHelper {
35 public: 35 public:
36 explicit AuraTestHelper(base::MessageLoopForUI* message_loop); 36 explicit AuraTestHelper(base::MessageLoopForUI* message_loop);
37 ~AuraTestHelper(); 37 ~AuraTestHelper();
38 38
39 // Creates and initializes (shows and sizes) the RootWindow for use in tests. 39 // Creates and initializes (shows and sizes) the RootWindow for use in tests.
40 void SetUp(bool allow_test_contexts); 40 void SetUp();
41 41
42 // Clean up objects that are created for tests. This also deletes the Env 42 // Clean up objects that are created for tests. This also deletes the Env
43 // object. 43 // object.
44 void TearDown(); 44 void TearDown();
45 45
46 // Flushes message loop. 46 // Flushes message loop.
47 void RunAllPendingInMessageLoop(); 47 void RunAllPendingInMessageLoop();
48 48
49 Window* root_window() { return root_window_->window(); } 49 Window* root_window() { return root_window_->window(); }
50 RootWindow* dispatcher() { return root_window_.get(); } 50 RootWindow* dispatcher() { return root_window_.get(); }
(...skipping 14 matching lines...) Expand all
65 scoped_ptr<TestScreen> test_screen_; 65 scoped_ptr<TestScreen> test_screen_;
66 scoped_ptr<ui::ScopedAnimationDurationScaleMode> zero_duration_mode_; 66 scoped_ptr<ui::ScopedAnimationDurationScaleMode> zero_duration_mode_;
67 67
68 DISALLOW_COPY_AND_ASSIGN(AuraTestHelper); 68 DISALLOW_COPY_AND_ASSIGN(AuraTestHelper);
69 }; 69 };
70 70
71 } // namespace test 71 } // namespace test
72 } // namespace aura 72 } // namespace aura
73 73
74 #endif // UI_AURA_TEST_AURA_TEST_HELPER_H_ 74 #endif // UI_AURA_TEST_AURA_TEST_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698