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/include/gtest/gtest.h" |
10 | 10 |
(...skipping 10 matching lines...) Expand all Loading... |
21 void RunTest_PostTask(MessagePumpFactory factory); | 21 void RunTest_PostTask(MessagePumpFactory factory); |
22 void RunTest_PostDelayedTask_Basic(MessagePumpFactory factory); | 22 void RunTest_PostDelayedTask_Basic(MessagePumpFactory factory); |
23 void RunTest_PostDelayedTask_InDelayOrder(MessagePumpFactory factory); | 23 void RunTest_PostDelayedTask_InDelayOrder(MessagePumpFactory factory); |
24 void RunTest_PostDelayedTask_InPostOrder(MessagePumpFactory factory); | 24 void RunTest_PostDelayedTask_InPostOrder(MessagePumpFactory factory); |
25 void RunTest_PostDelayedTask_InPostOrder_2(MessagePumpFactory factory); | 25 void RunTest_PostDelayedTask_InPostOrder_2(MessagePumpFactory factory); |
26 void RunTest_PostDelayedTask_InPostOrder_3(MessagePumpFactory factory); | 26 void RunTest_PostDelayedTask_InPostOrder_3(MessagePumpFactory factory); |
27 void RunTest_PostDelayedTask_SharedTimer(MessagePumpFactory factory); | 27 void RunTest_PostDelayedTask_SharedTimer(MessagePumpFactory factory); |
28 void RunTest_EnsureDeletion(MessagePumpFactory factory); | 28 void RunTest_EnsureDeletion(MessagePumpFactory factory); |
29 void RunTest_EnsureDeletion_Chain(MessagePumpFactory factory); | 29 void RunTest_EnsureDeletion_Chain(MessagePumpFactory factory); |
30 void RunTest_Nesting(MessagePumpFactory factory); | 30 void RunTest_Nesting(MessagePumpFactory factory); |
| 31 void RunTest_NestingObserver(MessagePumpFactory factory); |
31 void RunTest_RecursiveDenial1(MessagePumpFactory factory); | 32 void RunTest_RecursiveDenial1(MessagePumpFactory factory); |
32 void RunTest_RecursiveDenial3(MessagePumpFactory factory); | 33 void RunTest_RecursiveDenial3(MessagePumpFactory factory); |
33 void RunTest_RecursiveSupport1(MessagePumpFactory factory); | 34 void RunTest_RecursiveSupport1(MessagePumpFactory factory); |
34 void RunTest_NonNestableWithNoNesting(MessagePumpFactory factory); | 35 void RunTest_NonNestableWithNoNesting(MessagePumpFactory factory); |
35 void RunTest_NonNestableInNestedLoop(MessagePumpFactory factory, | 36 void RunTest_NonNestableInNestedLoop(MessagePumpFactory factory, |
36 bool use_delayed); | 37 bool use_delayed); |
37 void RunTest_QuitNow(MessagePumpFactory factory); | 38 void RunTest_QuitNow(MessagePumpFactory factory); |
38 void RunTest_RunLoopQuitTop(MessagePumpFactory factory); | 39 void RunTest_RunLoopQuitTop(MessagePumpFactory factory); |
39 void RunTest_RunLoopQuitNested(MessagePumpFactory factory); | 40 void RunTest_RunLoopQuitNested(MessagePumpFactory factory); |
40 void RunTest_RunLoopQuitBogus(MessagePumpFactory factory); | 41 void RunTest_RunLoopQuitBogus(MessagePumpFactory factory); |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 } \ | 78 } \ |
78 /* TODO(darin): MessageLoop does not support deleting all tasks in the */ \ | 79 /* TODO(darin): MessageLoop does not support deleting all tasks in the */ \ |
79 /* destructor. */ \ | 80 /* destructor. */ \ |
80 /* Fails, http://crbug.com/50272. */ \ | 81 /* Fails, http://crbug.com/50272. */ \ |
81 TEST(MessageLoopTestType##id, DISABLED_EnsureDeletion_Chain) { \ | 82 TEST(MessageLoopTestType##id, DISABLED_EnsureDeletion_Chain) { \ |
82 base::test::RunTest_EnsureDeletion_Chain(factory); \ | 83 base::test::RunTest_EnsureDeletion_Chain(factory); \ |
83 } \ | 84 } \ |
84 TEST(MessageLoopTestType##id, Nesting) { \ | 85 TEST(MessageLoopTestType##id, Nesting) { \ |
85 base::test::RunTest_Nesting(factory); \ | 86 base::test::RunTest_Nesting(factory); \ |
86 } \ | 87 } \ |
| 88 TEST(MessageLoopTestType##id, NestingObserver) { \ |
| 89 base::test::RunTest_NestingObserver(factory); \ |
| 90 } \ |
87 TEST(MessageLoopTestType##id, RecursiveDenial1) { \ | 91 TEST(MessageLoopTestType##id, RecursiveDenial1) { \ |
88 base::test::RunTest_RecursiveDenial1(factory); \ | 92 base::test::RunTest_RecursiveDenial1(factory); \ |
89 } \ | 93 } \ |
90 TEST(MessageLoopTestType##id, RecursiveDenial3) { \ | 94 TEST(MessageLoopTestType##id, RecursiveDenial3) { \ |
91 base::test::RunTest_RecursiveDenial3(factory); \ | 95 base::test::RunTest_RecursiveDenial3(factory); \ |
92 } \ | 96 } \ |
93 TEST(MessageLoopTestType##id, RecursiveSupport1) { \ | 97 TEST(MessageLoopTestType##id, RecursiveSupport1) { \ |
94 base::test::RunTest_RecursiveSupport1(factory); \ | 98 base::test::RunTest_RecursiveSupport1(factory); \ |
95 } \ | 99 } \ |
96 TEST(MessageLoopTestType##id, NonNestableWithNoNesting) { \ | 100 TEST(MessageLoopTestType##id, NonNestableWithNoNesting) { \ |
(...skipping 27 matching lines...) Expand all Loading... |
124 base::test::RunTest_RunLoopQuitOrderDuring(factory); \ | 128 base::test::RunTest_RunLoopQuitOrderDuring(factory); \ |
125 } \ | 129 } \ |
126 TEST(MessageLoopTestType##id, RunLoopQuitOrderAfter) { \ | 130 TEST(MessageLoopTestType##id, RunLoopQuitOrderAfter) { \ |
127 base::test::RunTest_RunLoopQuitOrderAfter(factory); \ | 131 base::test::RunTest_RunLoopQuitOrderAfter(factory); \ |
128 } \ | 132 } \ |
129 TEST(MessageLoopTestType##id, RecursivePosts) { \ | 133 TEST(MessageLoopTestType##id, RecursivePosts) { \ |
130 base::test::RunTest_RecursivePosts(factory); \ | 134 base::test::RunTest_RecursivePosts(factory); \ |
131 } \ | 135 } \ |
132 | 136 |
133 #endif // BASE_MESSAGE_LOOP_MESSAGE_LOOP_TEST_H_ | 137 #endif // BASE_MESSAGE_LOOP_MESSAGE_LOOP_TEST_H_ |
OLD | NEW |