OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/logging.h" | 5 #include "base/logging.h" |
6 #include "base/message_loop.h" | 6 #include "base/message_loop.h" |
7 #include "base/platform_thread.h" | 7 #include "base/platform_thread.h" |
8 #include "base/ref_counted.h" | 8 #include "base/ref_counted.h" |
9 #include "base/thread.h" | 9 #include "base/thread.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
11 | 11 |
12 #if defined(OS_WIN) | 12 #if defined(OS_WIN) |
13 #include "base/message_pump_win.h" | 13 #include "base/message_pump_win.h" |
14 #include "base/scoped_handle.h" | 14 #include "base/scoped_handle.h" |
15 #endif | 15 #endif |
16 | 16 |
17 using base::Thread; | 17 using base::Thread; |
| 18 using base::Time; |
| 19 using base::TimeDelta; |
18 | 20 |
19 // TODO(darin): Platform-specific MessageLoop tests should be grouped together | 21 // TODO(darin): Platform-specific MessageLoop tests should be grouped together |
20 // to avoid chopping this file up with so many #ifdefs. | 22 // to avoid chopping this file up with so many #ifdefs. |
21 | 23 |
22 namespace { | 24 namespace { |
23 | 25 |
24 class MessageLoopTest : public testing::Test {}; | 26 class MessageLoopTest : public testing::Test {}; |
25 | 27 |
26 class Foo : public base::RefCounted<Foo> { | 28 class Foo : public base::RefCounted<Foo> { |
27 public: | 29 public: |
(...skipping 1356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1384 | 1386 |
1385 TEST(MessageLoopTest, Dispatcher) { | 1387 TEST(MessageLoopTest, Dispatcher) { |
1386 // This test requires a UI loop | 1388 // This test requires a UI loop |
1387 RunTest_Dispatcher(MessageLoop::TYPE_UI); | 1389 RunTest_Dispatcher(MessageLoop::TYPE_UI); |
1388 } | 1390 } |
1389 | 1391 |
1390 TEST(MessageLoopTest, IOHandler) { | 1392 TEST(MessageLoopTest, IOHandler) { |
1391 RunTest_IOHandler(); | 1393 RunTest_IOHandler(); |
1392 } | 1394 } |
1393 #endif // defined(OS_WIN) | 1395 #endif // defined(OS_WIN) |
OLD | NEW |