| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 BASE_MESSAGE_LOOP_MESSAGE_LOOP_TEST_H_ | 5 #ifndef BASE_MESSAGE_LOOP_MESSAGE_LOOP_TEST_H_ |
| 6 #define BASE_MESSAGE_LOOP_MESSAGE_LOOP_TEST_H_ | 6 #define BASE_MESSAGE_LOOP_MESSAGE_LOOP_TEST_H_ |
| 7 | 7 |
| 8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/googletest/include/gtest/gtest.h" |
| 10 | 10 |
| 11 // This file consists of tests meant to exercise the combination of MessageLoop | 11 // This file consists of tests meant to exercise the combination of MessageLoop |
| 12 // and MessagePump. To use these define the macro RUN_MESSAGE_LOOP_TESTS using | 12 // and MessagePump. To use these define the macro RUN_MESSAGE_LOOP_TESTS using |
| 13 // an ID appropriate for your MessagePump, eg | 13 // an ID appropriate for your MessagePump, eg |
| 14 // RUN_MESSAGE_LOOP_TESTS(UI, factory). Factory is a function called to create | 14 // RUN_MESSAGE_LOOP_TESTS(UI, factory). Factory is a function called to create |
| 15 // the MessagePump. | 15 // the MessagePump. |
| 16 namespace base { | 16 namespace base { |
| 17 namespace test { | 17 namespace test { |
| 18 | 18 |
| 19 typedef MessageLoop::MessagePumpFactory MessagePumpFactory; | 19 typedef MessageLoop::MessagePumpFactory MessagePumpFactory; |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 base::test::RunTest_RunLoopQuitOrderDuring(factory); \ | 124 base::test::RunTest_RunLoopQuitOrderDuring(factory); \ |
| 125 } \ | 125 } \ |
| 126 TEST(MessageLoopTestType##id, RunLoopQuitOrderAfter) { \ | 126 TEST(MessageLoopTestType##id, RunLoopQuitOrderAfter) { \ |
| 127 base::test::RunTest_RunLoopQuitOrderAfter(factory); \ | 127 base::test::RunTest_RunLoopQuitOrderAfter(factory); \ |
| 128 } \ | 128 } \ |
| 129 TEST(MessageLoopTestType##id, RecursivePosts) { \ | 129 TEST(MessageLoopTestType##id, RecursivePosts) { \ |
| 130 base::test::RunTest_RecursivePosts(factory); \ | 130 base::test::RunTest_RecursivePosts(factory); \ |
| 131 } \ | 131 } \ |
| 132 | 132 |
| 133 #endif // BASE_MESSAGE_LOOP_MESSAGE_LOOP_TEST_H_ | 133 #endif // BASE_MESSAGE_LOOP_MESSAGE_LOOP_TEST_H_ |
| OLD | NEW |