| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/eintr_wrapper.h" | 10 #include "base/eintr_wrapper.h" |
| 11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "base/message_loop.h" | 13 #include "base/message_loop.h" |
| 14 #include "base/task.h" | |
| 15 #include "base/threading/platform_thread.h" | 14 #include "base/threading/platform_thread.h" |
| 16 #include "base/threading/thread.h" | 15 #include "base/threading/thread.h" |
| 17 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
| 18 | 17 |
| 19 #if defined(OS_WIN) | 18 #if defined(OS_WIN) |
| 20 #include "base/message_pump_win.h" | 19 #include "base/message_pump_win.h" |
| 21 #include "base/win/scoped_handle.h" | 20 #include "base/win/scoped_handle.h" |
| 22 #endif | 21 #endif |
| 23 | 22 |
| 24 using base::PlatformThread; | 23 using base::PlatformThread; |
| (...skipping 1630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1655 base::Bind(&DestructionObserverProbe::Run, | 1654 base::Bind(&DestructionObserverProbe::Run, |
| 1656 new DestructionObserverProbe(&task_destroyed, | 1655 new DestructionObserverProbe(&task_destroyed, |
| 1657 &destruction_observer_called)), | 1656 &destruction_observer_called)), |
| 1658 kDelayMS); | 1657 kDelayMS); |
| 1659 delete loop; | 1658 delete loop; |
| 1660 EXPECT_TRUE(observer.task_destroyed_before_message_loop()); | 1659 EXPECT_TRUE(observer.task_destroyed_before_message_loop()); |
| 1661 // The task should have been destroyed when we deleted the loop. | 1660 // The task should have been destroyed when we deleted the loop. |
| 1662 EXPECT_TRUE(task_destroyed); | 1661 EXPECT_TRUE(task_destroyed); |
| 1663 EXPECT_TRUE(destruction_observer_called); | 1662 EXPECT_TRUE(destruction_observer_called); |
| 1664 } | 1663 } |
| OLD | NEW |