Lines Matching refs:base
19 using base::TimeDelta;
20 using base::SingleThreadTaskRunner;
25 const base::MessageLoop::Type testing_message_loops[] = {
26 base::MessageLoop::TYPE_DEFAULT,
27 base::MessageLoop::TYPE_IO,
29 base::MessageLoop::TYPE_UI,
57 base::MessageLoop::current()->QuitWhenIdle(); in Run()
62 base::OneShotTimer timer_;
70 : did_run_(did_run), timer_(new base::OneShotTimer()) {} in OneShotSelfDeletingTimerTester()
81 base::MessageLoop::current()->QuitWhenIdle(); in Run()
85 std::unique_ptr<base::OneShotTimer> timer_;
103 base::MessageLoop::current()->QuitWhenIdle(); in Run()
110 base::RepeatingTimer timer_;
113 void RunTest_OneShotTimer(base::MessageLoop::Type message_loop_type) { in RunTest_OneShotTimer()
114 base::MessageLoop loop(message_loop_type); in RunTest_OneShotTimer()
120 base::RunLoop().Run(); in RunTest_OneShotTimer()
125 void RunTest_OneShotTimer_Cancel(base::MessageLoop::Type message_loop_type) { in RunTest_OneShotTimer_Cancel()
126 base::MessageLoop loop(message_loop_type); in RunTest_OneShotTimer_Cancel()
132 base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, a); in RunTest_OneShotTimer_Cancel()
141 base::RunLoop().Run(); in RunTest_OneShotTimer_Cancel()
148 base::MessageLoop::Type message_loop_type) { in RunTest_OneShotSelfDeletingTimer()
149 base::MessageLoop loop(message_loop_type); in RunTest_OneShotSelfDeletingTimer()
155 base::RunLoop().Run(); in RunTest_OneShotSelfDeletingTimer()
160 void RunTest_RepeatingTimer(base::MessageLoop::Type message_loop_type, in RunTest_RepeatingTimer()
162 base::MessageLoop loop(message_loop_type); in RunTest_RepeatingTimer()
168 base::RunLoop().Run(); in RunTest_RepeatingTimer()
173 void RunTest_RepeatingTimer_Cancel(base::MessageLoop::Type message_loop_type, in RunTest_RepeatingTimer_Cancel()
175 base::MessageLoop loop(message_loop_type); in RunTest_RepeatingTimer_Cancel()
181 base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, a); in RunTest_RepeatingTimer_Cancel()
190 base::RunLoop().Run(); in RunTest_RepeatingTimer_Cancel()
209 void RunTest_DelayTimer_NoCall(base::MessageLoop::Type message_loop_type) { in RunTest_DelayTimer_NoCall()
210 base::MessageLoop loop(message_loop_type); in RunTest_DelayTimer_NoCall()
214 base::DelayTimer timer(FROM_HERE, TimeDelta::FromMilliseconds(1), &target, in RunTest_DelayTimer_NoCall()
220 base::RunLoop().Run(); in RunTest_DelayTimer_NoCall()
225 void RunTest_DelayTimer_OneCall(base::MessageLoop::Type message_loop_type) { in RunTest_DelayTimer_OneCall()
226 base::MessageLoop loop(message_loop_type); in RunTest_DelayTimer_OneCall()
229 base::DelayTimer timer(FROM_HERE, TimeDelta::FromMilliseconds(1), &target, in RunTest_DelayTimer_OneCall()
236 base::RunLoop().Run(); in RunTest_DelayTimer_OneCall()
242 ResetHelper(base::DelayTimer* timer, DelayTimerTarget* target) in ResetHelper()
251 base::DelayTimer* const timer_;
255 void RunTest_DelayTimer_Reset(base::MessageLoop::Type message_loop_type) { in RunTest_DelayTimer_Reset()
256 base::MessageLoop loop(message_loop_type); in RunTest_DelayTimer_Reset()
260 base::DelayTimer timer(FROM_HERE, TimeDelta::FromMilliseconds(50), &target, in RunTest_DelayTimer_Reset()
266 base::OneShotTimer timers[20]; in RunTest_DelayTimer_Reset()
275 base::RunLoop().Run(); in RunTest_DelayTimer_Reset()
288 void RunTest_DelayTimer_Deleted(base::MessageLoop::Type message_loop_type) { in RunTest_DelayTimer_Deleted()
289 base::MessageLoop loop(message_loop_type); in RunTest_DelayTimer_Deleted()
294 base::DelayTimer timer(FROM_HERE, TimeDelta::FromMilliseconds(50), &target, in RunTest_DelayTimer_Deleted()
301 base::PlatformThread::Sleep(base::TimeDelta::FromMilliseconds(100)); in RunTest_DelayTimer_Deleted()
331 scoped_refptr<base::TestSimpleTaskRunner> task_runner = in TEST()
332 new base::TestSimpleTaskRunner(); in TEST()
409 base::MessageLoop loop; in TEST()
423 base::MessageLoop loop; in TEST()
424 base::Timer timer(false, false); in TEST()
427 base::Bind(&TimerTestCallback)); in TEST()
435 base::Timer timer(true, false); in TEST()
436 base::MessageLoop loop; in TEST()
439 base::Bind(&TimerTestCallback)); in TEST()
450 base::Timer timer(false, false); in TEST()
452 base::MessageLoop loop; in TEST()
455 base::Bind(&TimerTestCallback)); in TEST()
463 base::MessageLoop loop; in TEST()
464 base::Timer timer(FROM_HERE, TimeDelta::FromDays(1), in TEST()
465 base::Bind(&TimerTestCallback), true); in TEST()
476 base::MessageLoop loop; in TEST()
477 base::Timer timer(FROM_HERE, TimeDelta::FromDays(1), in TEST()
478 base::Bind(&TimerTestCallback), false); in TEST()
500 base::MessageLoop::current()->QuitWhenIdle(); in SetCallbackHappened1()
505 base::MessageLoop::current()->QuitWhenIdle(); in SetCallbackHappened2()
511 base::MessageLoop loop; in TEST()
512 base::Timer timer(false, false); in TEST()
514 base::Bind(&SetCallbackHappened1)); in TEST()
517 base::Bind(&SetCallbackHappened2)); in TEST()
518 base::RunLoop().Run(); in TEST()
527 base::MessageLoop loop; in TEST()
528 base::Timer timer(false, false); in TEST()
530 base::Bind(&SetCallbackHappened1)); in TEST()
534 base::RunLoop().Run(); in TEST()