| 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" |
| (...skipping 1625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1636 | 1636 |
| 1637 #if defined(OS_WIN) | 1637 #if defined(OS_WIN) |
| 1638 TEST(MessageLoopTest, PostDelayedTask_SharedTimer_SubPump) { | 1638 TEST(MessageLoopTest, PostDelayedTask_SharedTimer_SubPump) { |
| 1639 RunTest_PostDelayedTask_SharedTimer_SubPump(); | 1639 RunTest_PostDelayedTask_SharedTimer_SubPump(); |
| 1640 } | 1640 } |
| 1641 #endif | 1641 #endif |
| 1642 | 1642 |
| 1643 // TODO(darin): MessageLoop does not support deleting all tasks in the | 1643 // TODO(darin): MessageLoop does not support deleting all tasks in the |
| 1644 // destructor. | 1644 // destructor. |
| 1645 // Fails, http://crbug.com/50272. | 1645 // Fails, http://crbug.com/50272. |
| 1646 TEST(MessageLoopTest, FAILS_EnsureDeletion) { | 1646 TEST(MessageLoopTest, DISABLED_EnsureDeletion) { |
| 1647 RunTest_EnsureDeletion(MessageLoop::TYPE_DEFAULT); | 1647 RunTest_EnsureDeletion(MessageLoop::TYPE_DEFAULT); |
| 1648 RunTest_EnsureDeletion(MessageLoop::TYPE_UI); | 1648 RunTest_EnsureDeletion(MessageLoop::TYPE_UI); |
| 1649 RunTest_EnsureDeletion(MessageLoop::TYPE_IO); | 1649 RunTest_EnsureDeletion(MessageLoop::TYPE_IO); |
| 1650 } | 1650 } |
| 1651 | 1651 |
| 1652 // TODO(darin): MessageLoop does not support deleting all tasks in the | 1652 // TODO(darin): MessageLoop does not support deleting all tasks in the |
| 1653 // destructor. | 1653 // destructor. |
| 1654 // Fails, http://crbug.com/50272. | 1654 // Fails, http://crbug.com/50272. |
| 1655 TEST(MessageLoopTest, FAILS_EnsureDeletion_Chain) { | 1655 TEST(MessageLoopTest, DISABLED_EnsureDeletion_Chain) { |
| 1656 RunTest_EnsureDeletion_Chain(MessageLoop::TYPE_DEFAULT); | 1656 RunTest_EnsureDeletion_Chain(MessageLoop::TYPE_DEFAULT); |
| 1657 RunTest_EnsureDeletion_Chain(MessageLoop::TYPE_UI); | 1657 RunTest_EnsureDeletion_Chain(MessageLoop::TYPE_UI); |
| 1658 RunTest_EnsureDeletion_Chain(MessageLoop::TYPE_IO); | 1658 RunTest_EnsureDeletion_Chain(MessageLoop::TYPE_IO); |
| 1659 } | 1659 } |
| 1660 | 1660 |
| 1661 #if defined(OS_WIN) | 1661 #if defined(OS_WIN) |
| 1662 TEST(MessageLoopTest, Crasher) { | 1662 TEST(MessageLoopTest, Crasher) { |
| 1663 RunTest_Crasher(MessageLoop::TYPE_DEFAULT); | 1663 RunTest_Crasher(MessageLoop::TYPE_DEFAULT); |
| 1664 RunTest_Crasher(MessageLoop::TYPE_UI); | 1664 RunTest_Crasher(MessageLoop::TYPE_UI); |
| 1665 RunTest_Crasher(MessageLoop::TYPE_IO); | 1665 RunTest_Crasher(MessageLoop::TYPE_IO); |
| (...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2054 EXPECT_EQ(foo->test_count(), 1); | 2054 EXPECT_EQ(foo->test_count(), 1); |
| 2055 EXPECT_EQ(foo->result(), "a"); | 2055 EXPECT_EQ(foo->result(), "a"); |
| 2056 } | 2056 } |
| 2057 | 2057 |
| 2058 TEST(MessageLoopTest, IsType) { | 2058 TEST(MessageLoopTest, IsType) { |
| 2059 MessageLoop loop(MessageLoop::TYPE_UI); | 2059 MessageLoop loop(MessageLoop::TYPE_UI); |
| 2060 EXPECT_TRUE(loop.IsType(MessageLoop::TYPE_UI)); | 2060 EXPECT_TRUE(loop.IsType(MessageLoop::TYPE_UI)); |
| 2061 EXPECT_FALSE(loop.IsType(MessageLoop::TYPE_IO)); | 2061 EXPECT_FALSE(loop.IsType(MessageLoop::TYPE_IO)); |
| 2062 EXPECT_FALSE(loop.IsType(MessageLoop::TYPE_DEFAULT)); | 2062 EXPECT_FALSE(loop.IsType(MessageLoop::TYPE_DEFAULT)); |
| 2063 } | 2063 } |
| OLD | NEW |