| 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" | |
| 11 #include "base/logging.h" | 10 #include "base/logging.h" |
| 12 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 13 #include "base/message_loop.h" | 12 #include "base/message_loop.h" |
| 13 #include "base/posix/eintr_wrapper.h" |
| 14 #include "base/run_loop.h" | 14 #include "base/run_loop.h" |
| 15 #include "base/thread_task_runner_handle.h" | 15 #include "base/thread_task_runner_handle.h" |
| 16 #include "base/threading/platform_thread.h" | 16 #include "base/threading/platform_thread.h" |
| 17 #include "base/threading/thread.h" | 17 #include "base/threading/thread.h" |
| 18 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
| 19 | 19 |
| 20 #if defined(OS_WIN) | 20 #if defined(OS_WIN) |
| 21 #include "base/message_pump_win.h" | 21 #include "base/message_pump_win.h" |
| 22 #include "base/win/scoped_handle.h" | 22 #include "base/win/scoped_handle.h" |
| 23 #endif | 23 #endif |
| (...skipping 2030 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 |