Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Side by Side Diff: base/message_loop/message_loop_unittest.cc

Issue 1714263002: Version of MessagePumpForUI optimized for GPU process (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Handle messages for other threads without exiting WaitForWork Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 564 matching lines...) Expand 10 before | Expand all | Expand 10 after
575 //----------------------------------------------------------------------------- 575 //-----------------------------------------------------------------------------
576 // Each test is run against each type of MessageLoop. That way we are sure 576 // Each test is run against each type of MessageLoop. That way we are sure
577 // that message loops work properly in all configurations. Of course, in some 577 // that message loops work properly in all configurations. Of course, in some
578 // cases, a unit test may only be for a particular type of loop. 578 // cases, a unit test may only be for a particular type of loop.
579 579
580 RUN_MESSAGE_LOOP_TESTS(Default, &TypeDefaultMessagePumpFactory); 580 RUN_MESSAGE_LOOP_TESTS(Default, &TypeDefaultMessagePumpFactory);
581 RUN_MESSAGE_LOOP_TESTS(UI, &TypeUIMessagePumpFactory); 581 RUN_MESSAGE_LOOP_TESTS(UI, &TypeUIMessagePumpFactory);
582 RUN_MESSAGE_LOOP_TESTS(IO, &TypeIOMessagePumpFactory); 582 RUN_MESSAGE_LOOP_TESTS(IO, &TypeIOMessagePumpFactory);
583 583
584 #if defined(OS_WIN) 584 #if defined(OS_WIN)
585 // Additional set of tests for GPU version of UI message loop.
586 RUN_MESSAGE_LOOP_TESTS(GPU, &MessagePumpForGpu::CreateMessagePumpForGpu);
587
585 TEST(MessageLoopTest, PostDelayedTask_SharedTimer_SubPump) { 588 TEST(MessageLoopTest, PostDelayedTask_SharedTimer_SubPump) {
586 RunTest_PostDelayedTask_SharedTimer_SubPump(); 589 RunTest_PostDelayedTask_SharedTimer_SubPump();
587 } 590 }
588 591
589 // This test occasionally hangs. See http://crbug.com/44567. 592 // This test occasionally hangs. See http://crbug.com/44567.
590 TEST(MessageLoopTest, DISABLED_RecursiveDenial2) { 593 TEST(MessageLoopTest, DISABLED_RecursiveDenial2) {
591 RunTest_RecursiveDenial2(MessageLoop::TYPE_DEFAULT); 594 RunTest_RecursiveDenial2(MessageLoop::TYPE_DEFAULT);
592 RunTest_RecursiveDenial2(MessageLoop::TYPE_UI); 595 RunTest_RecursiveDenial2(MessageLoop::TYPE_UI);
593 RunTest_RecursiveDenial2(MessageLoop::TYPE_IO); 596 RunTest_RecursiveDenial2(MessageLoop::TYPE_IO);
594 } 597 }
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
971 // already has another active loop. This happens when thread creation fails. 974 // already has another active loop. This happens when thread creation fails.
972 MessageLoop loop; 975 MessageLoop loop;
973 scoped_ptr<MessageLoop> unbound_loop(MessageLoop::CreateUnbound( 976 scoped_ptr<MessageLoop> unbound_loop(MessageLoop::CreateUnbound(
974 MessageLoop::TYPE_DEFAULT, MessageLoop::MessagePumpFactoryCallback())); 977 MessageLoop::TYPE_DEFAULT, MessageLoop::MessagePumpFactoryCallback()));
975 unbound_loop.reset(); 978 unbound_loop.reset();
976 EXPECT_EQ(&loop, MessageLoop::current()); 979 EXPECT_EQ(&loop, MessageLoop::current());
977 EXPECT_EQ(loop.task_runner(), ThreadTaskRunnerHandle::Get()); 980 EXPECT_EQ(loop.task_runner(), ThreadTaskRunnerHandle::Get());
978 } 981 }
979 982
980 } // namespace base 983 } // namespace base
OLDNEW
« no previous file with comments | « no previous file | base/message_loop/message_pump_win.h » ('j') | base/message_loop/message_pump_win.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698