| Index: components/scheduler/renderer/throttling_helper_unittest.cc
|
| diff --git a/components/scheduler/renderer/throttling_helper_unittest.cc b/components/scheduler/renderer/throttling_helper_unittest.cc
|
| index 1e95a0bf4427aae4c839bc468bd56c89710634f3..4234d170189c47897ba05c56befcc9197e7c9064 100644
|
| --- a/components/scheduler/renderer/throttling_helper_unittest.cc
|
| +++ b/components/scheduler/renderer/throttling_helper_unittest.cc
|
| @@ -360,4 +360,25 @@ TEST_F(ThrottlingHelperTest, TaskDelayIsBasedOnRealTime) {
|
| base::TimeTicks() + base::TimeDelta::FromMilliseconds(3000.0)));
|
| }
|
|
|
| +TEST_F(ThrottlingHelperTest, TaskQueueDisabledTillPump) {
|
| + timer_queue_->PostTask(FROM_HERE, base::Bind(&NopTask));
|
| +
|
| + EXPECT_TRUE(timer_queue_->IsQueueEnabled());
|
| + throttling_helper_->IncreaseThrottleRefCount(timer_queue_.get());
|
| + EXPECT_FALSE(timer_queue_->IsQueueEnabled());
|
| +
|
| + mock_task_runner_->RunUntilIdle(); // Wait until the pump.
|
| + EXPECT_TRUE(timer_queue_->IsQueueEnabled());
|
| +}
|
| +
|
| +TEST_F(ThrottlingHelperTest, TaskQueueEnabledOnUnthrottle) {
|
| + timer_queue_->PostTask(FROM_HERE, base::Bind(&NopTask));
|
| +
|
| + throttling_helper_->IncreaseThrottleRefCount(timer_queue_.get());
|
| + EXPECT_FALSE(timer_queue_->IsQueueEnabled());
|
| +
|
| + throttling_helper_->DecreaseThrottleRefCount(timer_queue_.get());
|
| + EXPECT_TRUE(timer_queue_->IsQueueEnabled());
|
| +}
|
| +
|
| } // namespace scheduler
|
|
|