New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 657517 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner: ----
Closed: Oct 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

TestingPlatformSupportWithMockScheduler::runForPeriodSeconds doesn't work as expected

Project Member Reported by alexclarke@chromium.org, Oct 19 2016

Issue description

Developers quite reasonably expect a call to TestingPlatformSupportWithMockScheduler::runForPeriodSeconds(5.0) to advance time by 5 seconds.

It doesn't always do that, e.g. if no tasks are run then time isn't updated at all. We should fix that!
 
Project Member

Comment 1 by bugdroid1@chromium.org, Oct 20 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/98561e7b7897f88fbceed76c57cefa990c2cb90a

commit 98561e7b7897f88fbceed76c57cefa990c2cb90a
Author: alexclarke <alexclarke@chromium.org>
Date: Thu Oct 20 18:50:44 2016

Fix TestingPlatformSupportWithMockScheduler::runForPeriodSeconds

When one calls runForPeriodSeconds(x) you naturally expect the
testing clock to alwats advance by that many seconds.

Unfortunately cc::OrderedSimpleTaskRunner is a strange beast and
the actual time advances to the last delayed task before the
deadline if any.

This patch fixes that and makes the operation of timer fast
forwarding explicit.  It also fixes a bug in
TimerTest.RepeatingTimerDoesNotDrift which was relying on
strange behavior of cc::OrderedSimpleTaskRunner when
setAutoAdvanceNowToPendingTasks is false.

BUG= 657517 

Review-Url: https://chromiumcodereview.appspot.com/2433323003
Cr-Commit-Position: refs/heads/master@{#426545}

[modify] https://crrev.com/98561e7b7897f88fbceed76c57cefa990c2cb90a/third_party/WebKit/Source/platform/TimerTest.cpp
[modify] https://crrev.com/98561e7b7897f88fbceed76c57cefa990c2cb90a/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc
[modify] https://crrev.com/98561e7b7897f88fbceed76c57cefa990c2cb90a/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.h
[modify] https://crrev.com/98561e7b7897f88fbceed76c57cefa990c2cb90a/third_party/WebKit/Source/platform/testing/TestingPlatformSupport.cpp
[modify] https://crrev.com/98561e7b7897f88fbceed76c57cefa990c2cb90a/third_party/WebKit/Source/platform/testing/TestingPlatformSupport.h

Status: Fixed (was: Available)

Sign in to add a comment