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

Issue 660614 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Last visit > 30 days ago
Closed: Jul 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

SimpleTestTickClock should not start at zero

Project Member Reported by w...@chromium.org, Oct 29 2016

Issue description

zero is TimeBase's is_null() so almost all code assumes TickClocks don't return zero. As a result, the majority of STTC usage requires two or three lines of initialization, e.g.,:

  // Fake clock. Make sure start time is non zero.
  base::SimpleTestTickClock testing_clock;
  testing_clock.Advance(base::TimeDelta::FromSeconds(1));

A bunch of tests fail if we do this (https://codereview.chromium.org/2462773002/) so we should either, a) fix them all, or b) add a static factory function, e.g., SimpleTestTickClock* NewNonNullSimpleTestTickClock().

WDYT phajdan.jr@?
 

Comment 1 by w...@chromium.org, Nov 4 2016

Cc: brettw@chromium.org
brettw@ I hear you wrote the time classes. Do you have any feelings about this?
Seems reasonable to start at one second.

Comment 3 by w...@chromium.org, Nov 4 2016

Thanks, sgtm. I'll probably start looking at the ones that fail.

Comment 4 by w...@chromium.org, Jul 6 2017

Status: WontFix (was: Available)

Sign in to add a comment