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 #include "base/message_loop/message_loop_test.h" | 5 #include "base/message_loop/message_loop_test.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 |
7 #include <utility> | 9 #include <utility> |
8 | 10 |
9 #include "base/bind.h" | 11 #include "base/bind.h" |
| 12 #include "base/macros.h" |
10 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
11 #include "base/run_loop.h" | 14 #include "base/run_loop.h" |
12 #include "base/synchronization/waitable_event.h" | 15 #include "base/synchronization/waitable_event.h" |
13 #include "base/threading/thread.h" | 16 #include "base/threading/thread.h" |
14 | 17 |
15 namespace base { | 18 namespace base { |
16 namespace test { | 19 namespace test { |
17 | 20 |
18 namespace { | 21 namespace { |
19 | 22 |
(...skipping 988 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1008 void RunTest_RecursivePosts(MessagePumpFactory factory) { | 1011 void RunTest_RecursivePosts(MessagePumpFactory factory) { |
1009 const int kNumTimes = 1 << 17; | 1012 const int kNumTimes = 1 << 17; |
1010 scoped_ptr<MessagePump> pump(factory()); | 1013 scoped_ptr<MessagePump> pump(factory()); |
1011 MessageLoop loop(std::move(pump)); | 1014 MessageLoop loop(std::move(pump)); |
1012 loop.PostTask(FROM_HERE, Bind(&PostNTasksThenQuit, kNumTimes)); | 1015 loop.PostTask(FROM_HERE, Bind(&PostNTasksThenQuit, kNumTimes)); |
1013 loop.Run(); | 1016 loop.Run(); |
1014 } | 1017 } |
1015 | 1018 |
1016 } // namespace test | 1019 } // namespace test |
1017 } // namespace base | 1020 } // namespace base |
OLD | NEW |