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

Unified Diff: cc/test/scheduler_test_common.cc

Issue 1132753008: Replaced TestNowSource with SimpleTestTickClock. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased again. Replaces TimeSource with TickClock in TestAlwaysFailTimeSource Created 5 years, 6 months 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: cc/test/scheduler_test_common.cc
diff --git a/cc/test/scheduler_test_common.cc b/cc/test/scheduler_test_common.cc
index 7f730debe117fdd16036c31bab0892f5f1a68395..cd393ea6e3cec5e72dfdbf0885a5d21222bad3ae 100644
--- a/cc/test/scheduler_test_common.cc
+++ b/cc/test/scheduler_test_common.cc
@@ -17,14 +17,14 @@ void FakeTimeSourceClient::OnTimerTick() {
base::TimeTicks FakeDelayBasedTimeSource::Now() const { return now_; }
TestDelayBasedTimeSource::TestDelayBasedTimeSource(
- scoped_refptr<TestNowSource> now_src,
+ base::SimpleTestTickClock* now_src,
base::TimeDelta interval,
OrderedSimpleTaskRunner* task_runner)
: DelayBasedTimeSource(interval, task_runner), now_src_(now_src) {
}
base::TimeTicks TestDelayBasedTimeSource::Now() const {
- return now_src_->Now();
+ return now_src_->NowTicks();
}
std::string TestDelayBasedTimeSource::TypeString() const {
@@ -44,7 +44,7 @@ void FakeBeginFrameSource::AsValueInto(
}
TestBackToBackBeginFrameSource::TestBackToBackBeginFrameSource(
- scoped_refptr<TestNowSource> now_src,
+ base::SimpleTestTickClock* now_src,
base::SingleThreadTaskRunner* task_runner)
: BackToBackBeginFrameSource(task_runner), now_src_(now_src) {
}
@@ -53,7 +53,7 @@ TestBackToBackBeginFrameSource::~TestBackToBackBeginFrameSource() {
}
base::TimeTicks TestBackToBackBeginFrameSource::Now() {
- return now_src_->Now();
+ return now_src_->NowTicks();
}
TestSyntheticBeginFrameSource::TestSyntheticBeginFrameSource(
@@ -66,7 +66,7 @@ TestSyntheticBeginFrameSource::~TestSyntheticBeginFrameSource() {
TestSchedulerFrameSourcesConstructor::TestSchedulerFrameSourcesConstructor(
OrderedSimpleTaskRunner* test_task_runner,
- TestNowSource* now_src)
+ base::SimpleTestTickClock* now_src)
: test_task_runner_(test_task_runner), now_src_(now_src) {
}
TestSchedulerFrameSourcesConstructor::~TestSchedulerFrameSourcesConstructor() {
@@ -111,7 +111,7 @@ TestSchedulerFrameSourcesConstructor::ConstructUnthrottledFrameSource(
}
TestScheduler::TestScheduler(
- scoped_refptr<TestNowSource> now_src,
+ base::SimpleTestTickClock* now_src,
SchedulerClient* client,
const SchedulerSettings& scheduler_settings,
int layer_tree_host_id,
@@ -128,7 +128,7 @@ TestScheduler::TestScheduler(
}
base::TimeTicks TestScheduler::Now() const {
- return now_src_->Now();
+ return now_src_->NowTicks();
}
TestScheduler::~TestScheduler() {

Powered by Google App Engine
This is Rietveld 408576698