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

Side by Side Diff: chrome/test/base/view_event_test_base.h

Issue 205253003: [master] x11: Move X event handling out of the message-pump. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix-merge Created 6 years, 8 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 CHROME_TEST_BASE_VIEW_EVENT_TEST_BASE_H_ 5 #ifndef CHROME_TEST_BASE_VIEW_EVENT_TEST_BASE_H_
6 #define CHROME_TEST_BASE_VIEW_EVENT_TEST_BASE_H_ 6 #define CHROME_TEST_BASE_VIEW_EVENT_TEST_BASE_H_
7 7
8 // We only want to use ViewEventTestBase in test targets which properly 8 // We only want to use ViewEventTestBase in test targets which properly
9 // isolate each test case by running each test in a separate process. 9 // isolate each test case by running each test in a separate process.
10 // This way if a test hangs the test launcher can reliably terminate it. 10 // This way if a test hangs the test launcher can reliably terminate it.
(...skipping 16 matching lines...) Expand all
27 namespace aura { 27 namespace aura {
28 namespace test { 28 namespace test {
29 class AuraTestHelper; 29 class AuraTestHelper;
30 } 30 }
31 } 31 }
32 32
33 namespace gfx { 33 namespace gfx {
34 class Size; 34 class Size;
35 } 35 }
36 36
37 namespace ui {
38 class PlatformEventSource;
39 }
40
37 namespace wm { 41 namespace wm {
38 class WMState; 42 class WMState;
39 } 43 }
40 44
41 // Base class for Views based tests that dispatch events. 45 // Base class for Views based tests that dispatch events.
42 // 46 //
43 // As views based event test involves waiting for events to be processed, 47 // As views based event test involves waiting for events to be processed,
44 // writing a views based test is slightly different than that of writing 48 // writing a views based test is slightly different than that of writing
45 // other unit tests. In particular when the test fails or is done you need 49 // other unit tests. In particular when the test fails or is done you need
46 // to stop the message loop. This can be done by way of invoking the Done 50 // to stop the message loop. This can be done by way of invoking the Done
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 151
148 // Thread for posting background MouseMoves. 152 // Thread for posting background MouseMoves.
149 scoped_ptr<base::Thread> dnd_thread_; 153 scoped_ptr<base::Thread> dnd_thread_;
150 154
151 content::TestBrowserThreadBundle thread_bundle_; 155 content::TestBrowserThreadBundle thread_bundle_;
152 156
153 #if defined(OS_WIN) 157 #if defined(OS_WIN)
154 ui::ScopedOleInitializer ole_initializer_; 158 ui::ScopedOleInitializer ole_initializer_;
155 #endif 159 #endif
156 160
157 #if defined(USE_AURA)
158 scoped_ptr<aura::test::AuraTestHelper> aura_test_helper_; 161 scoped_ptr<aura::test::AuraTestHelper> aura_test_helper_;
159 scoped_ptr<wm::WMState> wm_state_; 162 scoped_ptr<wm::WMState> wm_state_;
160 #endif 163 scoped_ptr<ui::PlatformEventSource> event_source_;
161 164
162 ChromeViewsDelegate views_delegate_; 165 ChromeViewsDelegate views_delegate_;
163 166
164 DISALLOW_COPY_AND_ASSIGN(ViewEventTestBase); 167 DISALLOW_COPY_AND_ASSIGN(ViewEventTestBase);
165 }; 168 };
166 169
167 // Convenience macro for defining a ViewEventTestBase. See class description 170 // Convenience macro for defining a ViewEventTestBase. See class description
168 // of ViewEventTestBase for details. 171 // of ViewEventTestBase for details.
169 #define VIEW_TEST(test_class, name) \ 172 #define VIEW_TEST(test_class, name) \
170 TEST_F(test_class, name) {\ 173 TEST_F(test_class, name) {\
171 StartMessageLoopAndRunTest();\ 174 StartMessageLoopAndRunTest();\
172 } 175 }
173 176
174 #endif // defined(HAS_OUT_OF_PROC_TEST_RUNNER) 177 #endif // defined(HAS_OUT_OF_PROC_TEST_RUNNER)
175 178
176 #endif // CHROME_TEST_BASE_VIEW_EVENT_TEST_BASE_H_ 179 #endif // CHROME_TEST_BASE_VIEW_EVENT_TEST_BASE_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/bookmarks/bookmark_context_menu_unittest.cc ('k') | chrome/test/base/view_event_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698