OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <vector> | 5 #include <vector> |
6 | 6 |
7 #include "base/eintr_wrapper.h" | 7 #include "base/eintr_wrapper.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/ref_counted.h" | 10 #include "base/ref_counted.h" |
11 #include "base/task.h" | 11 #include "base/task.h" |
12 #include "base/threading/platform_thread.h" | 12 #include "base/threading/platform_thread.h" |
13 #include "base/thread.h" | 13 #include "base/threading/thread.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
15 | 15 |
16 #if defined(OS_WIN) | 16 #if defined(OS_WIN) |
17 #include "base/message_pump_win.h" | 17 #include "base/message_pump_win.h" |
18 #include "base/scoped_handle.h" | 18 #include "base/scoped_handle.h" |
19 #endif | 19 #endif |
20 #if defined(OS_POSIX) | 20 #if defined(OS_POSIX) |
21 #include "base/message_pump_libevent.h" | 21 #include "base/message_pump_libevent.h" |
22 #endif | 22 #endif |
23 | 23 |
(...skipping 1681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1705 loop->PostDelayedTask( | 1705 loop->PostDelayedTask( |
1706 FROM_HERE, | 1706 FROM_HERE, |
1707 new RunAtDestructionTask(&task_destroyed, &destruction_observer_called), | 1707 new RunAtDestructionTask(&task_destroyed, &destruction_observer_called), |
1708 kDelayMS); | 1708 kDelayMS); |
1709 delete loop; | 1709 delete loop; |
1710 EXPECT_TRUE(observer.task_destroyed_before_message_loop()); | 1710 EXPECT_TRUE(observer.task_destroyed_before_message_loop()); |
1711 // The task should have been destroyed when we deleted the loop. | 1711 // The task should have been destroyed when we deleted the loop. |
1712 EXPECT_TRUE(task_destroyed); | 1712 EXPECT_TRUE(task_destroyed); |
1713 EXPECT_TRUE(destruction_observer_called); | 1713 EXPECT_TRUE(destruction_observer_called); |
1714 } | 1714 } |
OLD | NEW |