Lines Matching refs:base
15 using base::TimeDelta;
16 using base::SingleThreadTaskRunner;
21 const base::MessageLoop::Type testing_message_loops[] = {
22 base::MessageLoop::TYPE_DEFAULT,
23 base::MessageLoop::TYPE_IO,
25 base::MessageLoop::TYPE_UI,
53 base::MessageLoop::current()->QuitWhenIdle(); in Run()
58 base::OneShotTimer timer_;
66 : did_run_(did_run), timer_(new base::OneShotTimer()) {} in OneShotSelfDeletingTimerTester()
77 base::MessageLoop::current()->QuitWhenIdle(); in Run()
81 scoped_ptr<base::OneShotTimer> timer_;
99 base::MessageLoop::current()->QuitWhenIdle(); in Run()
106 base::RepeatingTimer timer_;
109 void RunTest_OneShotTimer(base::MessageLoop::Type message_loop_type) { in RunTest_OneShotTimer()
110 base::MessageLoop loop(message_loop_type); in RunTest_OneShotTimer()
116 base::MessageLoop::current()->Run(); in RunTest_OneShotTimer()
121 void RunTest_OneShotTimer_Cancel(base::MessageLoop::Type message_loop_type) { in RunTest_OneShotTimer_Cancel()
122 base::MessageLoop loop(message_loop_type); in RunTest_OneShotTimer_Cancel()
128 base::MessageLoop::current()->DeleteSoon(FROM_HERE, a); in RunTest_OneShotTimer_Cancel()
137 base::MessageLoop::current()->Run(); in RunTest_OneShotTimer_Cancel()
144 base::MessageLoop::Type message_loop_type) { in RunTest_OneShotSelfDeletingTimer()
145 base::MessageLoop loop(message_loop_type); in RunTest_OneShotSelfDeletingTimer()
151 base::MessageLoop::current()->Run(); in RunTest_OneShotSelfDeletingTimer()
156 void RunTest_RepeatingTimer(base::MessageLoop::Type message_loop_type, in RunTest_RepeatingTimer()
158 base::MessageLoop loop(message_loop_type); in RunTest_RepeatingTimer()
164 base::MessageLoop::current()->Run(); in RunTest_RepeatingTimer()
169 void RunTest_RepeatingTimer_Cancel(base::MessageLoop::Type message_loop_type, in RunTest_RepeatingTimer_Cancel()
171 base::MessageLoop loop(message_loop_type); in RunTest_RepeatingTimer_Cancel()
177 base::MessageLoop::current()->DeleteSoon(FROM_HERE, a); in RunTest_RepeatingTimer_Cancel()
186 base::MessageLoop::current()->Run(); in RunTest_RepeatingTimer_Cancel()
205 void RunTest_DelayTimer_NoCall(base::MessageLoop::Type message_loop_type) { in RunTest_DelayTimer_NoCall()
206 base::MessageLoop loop(message_loop_type); in RunTest_DelayTimer_NoCall()
210 base::DelayTimer timer(FROM_HERE, TimeDelta::FromMilliseconds(1), &target, in RunTest_DelayTimer_NoCall()
216 base::MessageLoop::current()->Run(); in RunTest_DelayTimer_NoCall()
221 void RunTest_DelayTimer_OneCall(base::MessageLoop::Type message_loop_type) { in RunTest_DelayTimer_OneCall()
222 base::MessageLoop loop(message_loop_type); in RunTest_DelayTimer_OneCall()
225 base::DelayTimer timer(FROM_HERE, TimeDelta::FromMilliseconds(1), &target, in RunTest_DelayTimer_OneCall()
232 base::MessageLoop::current()->Run(); in RunTest_DelayTimer_OneCall()
238 ResetHelper(base::DelayTimer* timer, DelayTimerTarget* target) in ResetHelper()
247 base::DelayTimer* const timer_;
251 void RunTest_DelayTimer_Reset(base::MessageLoop::Type message_loop_type) { in RunTest_DelayTimer_Reset()
252 base::MessageLoop loop(message_loop_type); in RunTest_DelayTimer_Reset()
256 base::DelayTimer timer(FROM_HERE, TimeDelta::FromMilliseconds(50), &target, in RunTest_DelayTimer_Reset()
262 base::OneShotTimer timers[20]; in RunTest_DelayTimer_Reset()
271 base::MessageLoop::current()->Run(); in RunTest_DelayTimer_Reset()
284 void RunTest_DelayTimer_Deleted(base::MessageLoop::Type message_loop_type) { in RunTest_DelayTimer_Deleted()
285 base::MessageLoop loop(message_loop_type); in RunTest_DelayTimer_Deleted()
290 base::DelayTimer timer(FROM_HERE, TimeDelta::FromMilliseconds(50), &target, in RunTest_DelayTimer_Deleted()
297 base::PlatformThread::Sleep(base::TimeDelta::FromMilliseconds(100)); in RunTest_DelayTimer_Deleted()
327 scoped_refptr<base::TestSimpleTaskRunner> task_runner = in TEST()
328 new base::TestSimpleTaskRunner(); in TEST()
405 base::MessageLoop loop; in TEST()
419 base::MessageLoop loop; in TEST()
420 base::Timer timer(false, false); in TEST()
423 base::Bind(&TimerTestCallback)); in TEST()
431 base::Timer timer(true, false); in TEST()
432 base::MessageLoop loop; in TEST()
435 base::Bind(&TimerTestCallback)); in TEST()
446 base::Timer timer(false, false); in TEST()
448 base::MessageLoop loop; in TEST()
451 base::Bind(&TimerTestCallback)); in TEST()
459 base::MessageLoop loop; in TEST()
460 base::Timer timer(FROM_HERE, TimeDelta::FromDays(1), in TEST()
461 base::Bind(&TimerTestCallback), true); in TEST()
472 base::MessageLoop loop; in TEST()
473 base::Timer timer(FROM_HERE, TimeDelta::FromDays(1), in TEST()
474 base::Bind(&TimerTestCallback), false); in TEST()
496 base::MessageLoop::current()->QuitWhenIdle(); in SetCallbackHappened1()
501 base::MessageLoop::current()->QuitWhenIdle(); in SetCallbackHappened2()
507 base::MessageLoop loop; in TEST()
508 base::Timer timer(false, false); in TEST()
510 base::Bind(&SetCallbackHappened1)); in TEST()
513 base::Bind(&SetCallbackHappened2)); in TEST()
514 base::MessageLoop::current()->Run(); in TEST()
523 base::MessageLoop loop; in TEST()
524 base::Timer timer(false, false); in TEST()
526 base::Bind(&SetCallbackHappened1)); in TEST()
530 base::MessageLoop::current()->Run(); in TEST()