Lines Matching defs:loop
110 MessageLoop loop(MessageLoop::TYPE_UI);
116 // run loop to exit.
120 loop.PostTask(FROM_HERE, Bind(&SubPumpFunc));
123 loop.PostDelayedTask(
129 loop.PostDelayedTask(
136 loop.Run();
234 // MessageLoop implicitly start a "modal message loop". Modal dialog boxes,
288 // ran _inside_ the MessageBox message loop, dismissing the MessageBox
299 // message loop.
322 // message loop functionality.
326 MessageLoop loop(message_loop_type);
370 MessageLoop loop(message_loop_type);
393 // Note that this executes in the MessageBox modal loop.
577 // cases, a unit test may only be for a particular type of loop.
584 // Additional set of tests for GPU version of UI message loop.
599 // This test requires a UI loop.
640 MessageLoop loop;
641 loop.AddTaskObserver(&observer);
642 loop.task_runner()->PostTask(FROM_HERE, Bind(&PostNTasksThenQuit, kNumPosts));
644 loop.RemoveTaskObserver(&observer);
660 MessageLoop loop;
666 EXPECT_FALSE(loop.HasHighResolutionTasks());
668 loop.PostDelayedTask(FROM_HERE, Bind(&PostNTasksThenQuit, 1),
670 EXPECT_TRUE(loop.HasHighResolutionTasks());
671 loop.Run();
672 EXPECT_FALSE(loop.HasHighResolutionTasks());
675 loop.PostDelayedTask(FROM_HERE, Bind(&PostNTasksThenQuit, 1),
677 EXPECT_FALSE(loop.HasHighResolutionTasks());
678 loop.Run();
679 EXPECT_FALSE(loop.HasHighResolutionTasks());
711 // Arrange for controller to live longer than message loop.
719 // and don't run the message loop, just destroy it.
736 // Arrange for message loop to live longer than controller.
810 MessageLoop* loop = new MessageLoop;
817 loop->AddDestructionObserver(&observer);
818 loop->task_runner()->PostDelayedTask(
823 delete loop;
825 // The task should have been destroyed when we deleted the loop.
832 // posts tasks on that message loop.
834 MessageLoop loop;
854 MessageLoop loop(MessageLoop::TYPE_UI);
855 EXPECT_TRUE(loop.IsType(MessageLoop::TYPE_UI));
856 EXPECT_FALSE(loop.IsType(MessageLoop::TYPE_IO));
857 EXPECT_FALSE(loop.IsType(MessageLoop::TYPE_DEFAULT));
900 // Since we're about to enter a modal loop, tell the message loop that we
906 // Run a nested windows-style message loop and verify that our task runs. If
907 // it doesn't, then we'll loop here until the test times out.
912 // If this message is a WM_CLOSE, explicitly exit the modal loop. Posting
914 // WM_QUIT messages even when running inside a modal loop.
926 MessageLoop loop(MessageLoop::TYPE_UI);
942 loop.Run();
949 MessageLoop loop;
952 loop.SetTaskRunner(new_runner);
953 EXPECT_EQ(new_runner, loop.task_runner());
958 MessageLoop loop;
960 scoped_refptr<SingleThreadTaskRunner> original_runner(loop.task_runner());
961 loop.SetTaskRunner(new_runner);
971 // It should be possible to delete an unbound message loop on a thread which
972 // already has another active loop. This happens when thread creation fails.
973 MessageLoop loop;
977 EXPECT_EQ(&loop, MessageLoop::current());
978 EXPECT_EQ(loop.task_runner(), ThreadTaskRunnerHandle::Get());
984 MessageLoop loop;
986 EXPECT_EQ(kThreadName, loop.GetThreadName());