Commit fd3f5520 authored by Sami Kyostila's avatar Sami Kyostila Committed by Commit Bot

SequenceManager: Increase high resolution task test coverage

TBR=gab@chromium.org

Bug: 891670
Change-Id: I66e545c6bdbf04333cbd9178f8af9f8b2419e543
Reviewed-on: https://chromium-review.googlesource.com/c/1301456Reviewed-by: default avatarSami Kyöstilä <skyostil@chromium.org>
Commit-Queue: Sami Kyöstilä <skyostil@chromium.org>
Cr-Commit-Position: refs/heads/master@{#603050}
parent 5ac9ece1
......@@ -3443,6 +3443,12 @@ TEST_P(SequenceManagerTest, HasPendingHighResolutionTasks) {
RunLoop().RunUntilIdle();
EXPECT_EQ(manager_->HasPendingHighResolutionTasks(), supports_high_res);
// Advancing to just before a pending low resolution task doesn't mean that we
// have pending high resolution work.
test_task_runner_->AdvanceMockTickClock(TimeDelta::FromMilliseconds(99));
RunLoop().RunUntilIdle();
EXPECT_FALSE(manager_->HasPendingHighResolutionTasks());
test_task_runner_->AdvanceMockTickClock(TimeDelta::FromMilliseconds(100));
RunLoop().RunUntilIdle();
EXPECT_FALSE(manager_->HasPendingHighResolutionTasks());
......
......@@ -287,7 +287,7 @@ class BASE_EXPORT TaskQueueImpl {
private:
std::priority_queue<Task> queue_;
// Number of pending tasks in that need high resolution timing.
// Number of pending tasks in the queue that need high resolution timing.
int pending_high_res_tasks_ = 0;
DISALLOW_COPY_AND_ASSIGN(DelayedIncomingQueue);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment