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

Unified Diff: cc/scheduler/begin_frame_source_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
« no previous file with comments | « base/test/simple_test_tick_clock.cc ('k') | cc/scheduler/scheduler_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/scheduler/begin_frame_source_unittest.cc
diff --git a/cc/scheduler/begin_frame_source_unittest.cc b/cc/scheduler/begin_frame_source_unittest.cc
index 43ba4fa795f4095c3fa3cafdea84278c99abb571..778d39c12ed9fac721fedf43d44488a915fc1d72 100644
--- a/cc/scheduler/begin_frame_source_unittest.cc
+++ b/cc/scheduler/begin_frame_source_unittest.cc
@@ -188,8 +188,8 @@ class BackToBackBeginFrameSourceTest : public ::testing::Test {
scoped_ptr<MockBeginFrameObserver> obs_;
void SetUp() override {
- now_src_.reset(new base::SimpleTestTickClock());
- now_src_->Advance(base::TimeDelta::FromMicroseconds(1000));
+ now_src_.reset(new base::SimpleTestTickClock(
+ base::TimeTicks() + base::TimeDelta::FromMicroseconds(1000)));
task_runner_ =
make_scoped_refptr(new OrderedSimpleTaskRunner(now_src_.get(), false));
task_runner_->SetRunTaskLimit(1);
@@ -355,8 +355,8 @@ class SyntheticBeginFrameSourceTest : public ::testing::Test {
scoped_ptr<MockBeginFrameObserver> obs_;
void SetUp() override {
- now_src_.reset(new base::SimpleTestTickClock());
- now_src_->Advance(base::TimeDelta::FromMicroseconds(1000));
+ now_src_.reset(new base::SimpleTestTickClock(
+ base::TimeTicks() + base::TimeDelta::FromMicroseconds(1000)));
task_runner_ =
make_scoped_refptr(new OrderedSimpleTaskRunner(now_src_.get(), false));
source_ = TestSyntheticBeginFrameSource::Create(
« no previous file with comments | « base/test/simple_test_tick_clock.cc ('k') | cc/scheduler/scheduler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698