OLD | NEW |
1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 // We only want to use ViewEventTestBase in test targets which properly | 9 // We only want to use ViewEventTestBase in test targets which properly |
10 // isolate each test case by running each test in a separate process. | 10 // isolate each test case by running each test in a separate process. |
11 // This way if a test hangs the test launcher can reliably terminate it. | 11 // This way if a test hangs the test launcher can reliably terminate it. |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 // The content of the Window. | 130 // The content of the Window. |
131 views::View* content_view_; | 131 views::View* content_view_; |
132 | 132 |
133 // Thread for posting background MouseMoves. | 133 // Thread for posting background MouseMoves. |
134 scoped_ptr<base::Thread> dnd_thread_; | 134 scoped_ptr<base::Thread> dnd_thread_; |
135 | 135 |
136 MessageLoopForUI message_loop_; | 136 MessageLoopForUI message_loop_; |
137 | 137 |
138 content::TestBrowserThread ui_thread_; | 138 content::TestBrowserThread ui_thread_; |
139 | 139 |
140 // Method factory used for time-outs. | |
141 ScopedRunnableMethodFactory<ViewEventTestBase> method_factory_; | |
142 | |
143 DISALLOW_COPY_AND_ASSIGN(ViewEventTestBase); | 140 DISALLOW_COPY_AND_ASSIGN(ViewEventTestBase); |
144 }; | 141 }; |
145 | 142 |
146 // Convenience macro for defining a ViewEventTestBase. See class description | 143 // Convenience macro for defining a ViewEventTestBase. See class description |
147 // of ViewEventTestBase for details. | 144 // of ViewEventTestBase for details. |
148 #define VIEW_TEST(test_class, name) \ | 145 #define VIEW_TEST(test_class, name) \ |
149 TEST_F(test_class, name) {\ | 146 TEST_F(test_class, name) {\ |
150 StartMessageLoopAndRunTest();\ | 147 StartMessageLoopAndRunTest();\ |
151 } | 148 } |
152 | 149 |
153 #endif // defined(HAS_OUT_OF_PROC_TEST_RUNNER) | 150 #endif // defined(HAS_OUT_OF_PROC_TEST_RUNNER) |
154 | 151 |
155 #endif // CHROME_TEST_BASE_VIEW_EVENT_TEST_BASE_H_ | 152 #endif // CHROME_TEST_BASE_VIEW_EVENT_TEST_BASE_H_ |
OLD | NEW |