| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 607 //----------------------------------------------------------------------------- | 607 //----------------------------------------------------------------------------- |
| 608 // Each test is run against each type of MessageLoop. That way we are sure | 608 // Each test is run against each type of MessageLoop. That way we are sure |
| 609 // that message loops work properly in all configurations. Of course, in some | 609 // that message loops work properly in all configurations. Of course, in some |
| 610 // cases, a unit test may only be for a particular type of loop. | 610 // cases, a unit test may only be for a particular type of loop. |
| 611 | 611 |
| 612 RUN_MESSAGE_LOOP_TESTS(Default, &TypeDefaultMessagePumpFactory); | 612 RUN_MESSAGE_LOOP_TESTS(Default, &TypeDefaultMessagePumpFactory); |
| 613 RUN_MESSAGE_LOOP_TESTS(UI, &TypeUIMessagePumpFactory); | 613 RUN_MESSAGE_LOOP_TESTS(UI, &TypeUIMessagePumpFactory); |
| 614 RUN_MESSAGE_LOOP_TESTS(IO, &TypeIOMessagePumpFactory); | 614 RUN_MESSAGE_LOOP_TESTS(IO, &TypeIOMessagePumpFactory); |
| 615 | 615 |
| 616 #if defined(OS_WIN) | 616 #if defined(OS_WIN) |
| 617 // Additional set of tests for GPU version of UI message loop. | |
| 618 RUN_MESSAGE_LOOP_TESTS(GPU, &MessagePumpForGpu::CreateMessagePumpForGpu); | |
| 619 | |
| 620 TEST(MessageLoopTest, PostDelayedTask_SharedTimer_SubPump) { | 617 TEST(MessageLoopTest, PostDelayedTask_SharedTimer_SubPump) { |
| 621 RunTest_PostDelayedTask_SharedTimer_SubPump(); | 618 RunTest_PostDelayedTask_SharedTimer_SubPump(); |
| 622 } | 619 } |
| 623 | 620 |
| 624 // This test occasionally hangs. See http://crbug.com/44567. | 621 // This test occasionally hangs. See http://crbug.com/44567. |
| 625 TEST(MessageLoopTest, DISABLED_RecursiveDenial2) { | 622 TEST(MessageLoopTest, DISABLED_RecursiveDenial2) { |
| 626 RunTest_RecursiveDenial2(MessageLoop::TYPE_DEFAULT); | 623 RunTest_RecursiveDenial2(MessageLoop::TYPE_DEFAULT); |
| 627 RunTest_RecursiveDenial2(MessageLoop::TYPE_UI); | 624 RunTest_RecursiveDenial2(MessageLoop::TYPE_UI); |
| 628 RunTest_RecursiveDenial2(MessageLoop::TYPE_IO); | 625 RunTest_RecursiveDenial2(MessageLoop::TYPE_IO); |
| 629 } | 626 } |
| (...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1024 | 1021 |
| 1025 { | 1022 { |
| 1026 std::string kThreadName("bar"); | 1023 std::string kThreadName("bar"); |
| 1027 base::Thread thread(kThreadName); | 1024 base::Thread thread(kThreadName); |
| 1028 ASSERT_TRUE(thread.StartAndWaitForTesting()); | 1025 ASSERT_TRUE(thread.StartAndWaitForTesting()); |
| 1029 EXPECT_EQ(kThreadName, thread.message_loop()->GetThreadName()); | 1026 EXPECT_EQ(kThreadName, thread.message_loop()->GetThreadName()); |
| 1030 } | 1027 } |
| 1031 } | 1028 } |
| 1032 | 1029 |
| 1033 } // namespace base | 1030 } // namespace base |
| OLD | NEW |