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

Unified Diff: cc/trees/layer_tree_host_impl_unittest.cc

Issue 26880010: gfx: Add FrameTime and DisplayTime classes (Closed) Base URL: http://git.chromium.org/chromium/src.git@checkHighResNow4
Patch Set: WIP Created 7 years, 2 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
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | cc/trees/layer_tree_host_unittest_animation.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl_unittest.cc
diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_host_impl_unittest.cc
index a35191a7f57db28c04bba5acf25efcc420a8db27..56bdc900c5d340007363e33a5516eb46413edb47 100644
--- a/cc/trees/layer_tree_host_impl_unittest.cc
+++ b/cc/trees/layer_tree_host_impl_unittest.cc
@@ -1149,11 +1149,11 @@ class LayerTreeHostImplOverridePhysicalTime : public LayerTreeHostImpl {
rendering_stats_instrumentation,
NULL) {}
- virtual base::TimeTicks CurrentPhysicalTimeTicks() const OVERRIDE {
+ virtual base::TimeTicks CurrentPhysicalFrameTime() const OVERRIDE {
return fake_current_physical_time_;
}
- void SetCurrentPhysicalTimeTicksForTest(base::TimeTicks fake_now) {
+ void SetCurrentPhysicalFrameTimeForTest(base::TimeTicks fake_now) {
fake_current_physical_time_ = fake_now;
}
@@ -1208,8 +1208,8 @@ TEST_F(LayerTreeHostImplTest, ScrollbarLinearFadeScheduling) {
host_impl_->active_tree()->DidBecomeActive();
InitializeRendererAndDrawFrame();
- base::TimeTicks fake_now = gfx::FrameTime::Now();
- host_impl_override_time->SetCurrentPhysicalTimeTicksForTest(fake_now);
+ gfx::FrameTime fake_now = gfx::FrameTime::Now();
+ host_impl_override_time->SetCurrentPhysicalFrameTimeForTest(fake_now);
// If no scroll happened recently, StartScrollbarAnimation should have no
// effect.
@@ -1239,7 +1239,7 @@ TEST_F(LayerTreeHostImplTest, ScrollbarLinearFadeScheduling) {
// After the fade begins, we should start getting redraws instead of a
// scheduled animation.
fake_now += base::TimeDelta::FromMilliseconds(25);
- host_impl_override_time->SetCurrentPhysicalTimeTicksForTest(fake_now);
+ host_impl_override_time->SetCurrentPhysicalFrameTimeForTest(fake_now);
host_impl_->StartScrollbarAnimation();
EXPECT_EQ(base::TimeDelta(), requested_scrollbar_animation_delay_);
EXPECT_TRUE(did_request_redraw_);
@@ -1248,7 +1248,7 @@ TEST_F(LayerTreeHostImplTest, ScrollbarLinearFadeScheduling) {
// If no scroll happened recently, StartScrollbarAnimation should have no
// effect.
fake_now += base::TimeDelta::FromMilliseconds(25);
- host_impl_override_time->SetCurrentPhysicalTimeTicksForTest(fake_now);
+ host_impl_override_time->SetCurrentPhysicalFrameTimeForTest(fake_now);
host_impl_->StartScrollbarAnimation();
EXPECT_EQ(base::TimeDelta(), requested_scrollbar_animation_delay_);
EXPECT_FALSE(did_request_redraw_);
@@ -1265,7 +1265,7 @@ TEST_F(LayerTreeHostImplTest, ScrollbarLinearFadeScheduling) {
// None of the above should have called CurrentFrameTimeTicks, so if we call
// it now we should get the current time.
fake_now += base::TimeDelta::FromMilliseconds(10);
- host_impl_override_time->SetCurrentPhysicalTimeTicksForTest(fake_now);
+ host_impl_override_time->SetCurrentPhysicalFrameTimeForTest(fake_now);
EXPECT_EQ(fake_now, host_impl_->CurrentFrameTimeTicks());
}
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | cc/trees/layer_tree_host_unittest_animation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698