Commit e395fc93 authored by Oleg Davydov's avatar Oleg Davydov Committed by Commit Bot

Use SimpleTestClock::Advance in WallClockTimerTest

This is minor simplification in WallClockTimer: Instead of SetNow(Now()
+ delay) idiom use special SimpleTestClock method.

Bug: None
Change-Id: I035bfe44792c0e12c23373ded65ad520792d1824
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2418317
Commit-Queue: Oleg Davydov <burunduk@chromium.org>
Commit-Queue: Owen Min <zmin@chromium.org>
Auto-Submit: Oleg Davydov <burunduk@chromium.org>
Reviewed-by: default avatarOwen Min <zmin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#808381}
parent e83328f7
...@@ -27,7 +27,7 @@ class WallClockTimerTest : public ::testing::Test { ...@@ -27,7 +27,7 @@ class WallClockTimerTest : public ::testing::Test {
if (!with_power) if (!with_power)
fake_power_monitor_source_.Suspend(); fake_power_monitor_source_.Suspend();
clock_.SetNow(clock_.Now() + delay); clock_.Advance(delay);
if (with_power) { if (with_power) {
task_environment_.FastForwardBy(delay); task_environment_.FastForwardBy(delay);
......
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