| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_INTERACTIVE_UI_VIEW_EVENT_TEST_BASE_H_ | 5 #ifndef CHROME_TEST_BASE_VIEW_EVENT_TEST_BASE_H_ |
| 6 #define CHROME_TEST_INTERACTIVE_UI_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. |
| 12 #if defined(HAS_OUT_OF_PROC_TEST_RUNNER) | 12 #if defined(HAS_OUT_OF_PROC_TEST_RUNNER) |
| 13 | 13 |
| 14 #include "base/message_loop.h" | 14 #include "base/message_loop.h" |
| 15 #include "base/task.h" | 15 #include "base/task.h" |
| 16 #include "base/threading/thread.h" | 16 #include "base/threading/thread.h" |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 | 142 |
| 143 // Convenience macro for defining a ViewEventTestBase. See class description | 143 // Convenience macro for defining a ViewEventTestBase. See class description |
| 144 // of ViewEventTestBase for details. | 144 // of ViewEventTestBase for details. |
| 145 #define VIEW_TEST(test_class, name) \ | 145 #define VIEW_TEST(test_class, name) \ |
| 146 TEST_F(test_class, name) {\ | 146 TEST_F(test_class, name) {\ |
| 147 StartMessageLoopAndRunTest();\ | 147 StartMessageLoopAndRunTest();\ |
| 148 } | 148 } |
| 149 | 149 |
| 150 #endif // defined(HAS_OUT_OF_PROC_TEST_RUNNER) | 150 #endif // defined(HAS_OUT_OF_PROC_TEST_RUNNER) |
| 151 | 151 |
| 152 #endif // CHROME_TEST_INTERACTIVE_UI_VIEW_EVENT_TEST_BASE_H_ | 152 #endif // CHROME_TEST_BASE_VIEW_EVENT_TEST_BASE_H_ |
| OLD | NEW |