Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(288)

Unified Diff: components/metrics/profiler/tracking_synchronizer_unittest.cc

Issue 1178423008: Provision to start base::SimpleTestTickClock at initial ticks Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/metrics/profiler/tracking_synchronizer_unittest.cc
diff --git a/components/metrics/profiler/tracking_synchronizer_unittest.cc b/components/metrics/profiler/tracking_synchronizer_unittest.cc
index 10e7a27a1e6838b5b90a5a2596c1c3b893b45327..1421c3923c4ae66810d346030a8ff8184de32154 100644
--- a/components/metrics/profiler/tracking_synchronizer_unittest.cc
+++ b/components/metrics/profiler/tracking_synchronizer_unittest.cc
@@ -119,9 +119,10 @@ class TestTrackingSynchronizer : public TrackingSynchronizer {
TEST(TrackingSynchronizerTest, ProfilerData) {
// Testing how TrackingSynchronizer reports 2 phases of profiling.
- auto clock = new base::SimpleTestTickClock(); // Will be owned by
- // |tracking_synchronizer|.
- clock->Advance(base::TimeDelta::FromMilliseconds(111));
+ auto clock = new base::SimpleTestTickClock(
+ base::TimeTicks() +
+ base::TimeDelta::FromMilliseconds(
+ 111)); // Will be owned by |tracking_synchronizer|.
scoped_refptr<TestTrackingSynchronizer> tracking_synchronizer =
new TestTrackingSynchronizer(make_scoped_ptr(clock));

Powered by Google App Engine
This is Rietveld 408576698