Index: content/renderer/scheduler/renderer_scheduler_impl_unittest.cc |
diff --git a/content/renderer/scheduler/renderer_scheduler_impl_unittest.cc b/content/renderer/scheduler/renderer_scheduler_impl_unittest.cc |
index 701a222c71ed724c974382bfff62e9509a68bfe9..687f62a6754167d3968a4abfd0fca63bdfef0c49 100644 |
--- a/content/renderer/scheduler/renderer_scheduler_impl_unittest.cc |
+++ b/content/renderer/scheduler/renderer_scheduler_impl_unittest.cc |
@@ -306,6 +306,33 @@ TEST_F(RendererSchedulerImplTest, TestCompositorPolicy) { |
std::string("I1"))); |
} |
+TEST_F(RendererSchedulerImplTest, TestCompositorPolicy_DidAnimateForInput) { |
+ std::vector<std::string> order; |
+ |
+ idle_task_runner_->PostIdleTask( |
+ FROM_HERE, |
+ base::Bind(&AppendToVectorIdleTestTask, &order, std::string("I1"))); |
+ default_task_runner_->PostTask( |
+ FROM_HERE, |
+ base::Bind(&AppendToVectorTestTask, &order, std::string("D1"))); |
+ compositor_task_runner_->PostTask( |
+ FROM_HERE, |
+ base::Bind(&AppendToVectorTestTask, &order, std::string("C1"))); |
+ default_task_runner_->PostTask( |
+ FROM_HERE, |
+ base::Bind(&AppendToVectorTestTask, &order, std::string("D2"))); |
+ compositor_task_runner_->PostTask( |
+ FROM_HERE, |
+ base::Bind(&AppendToVectorTestTask, &order, std::string("C2"))); |
+ |
+ scheduler_->DidAnimateForInputOnCompositorThread(); |
+ EnableIdleTasks(); |
+ RunUntilIdle(); |
+ EXPECT_THAT(order, testing::ElementsAre(std::string("C1"), std::string("C2"), |
+ std::string("D1"), std::string("D2"), |
+ std::string("I1"))); |
+} |
+ |
TEST_F(RendererSchedulerImplTest, |
TestCompositorPolicyDoesNotStarveDefaultTasks) { |
std::vector<std::string> order; |