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

Unified Diff: cc/animation/scrollbar_animation_controller_thinning_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/animation/scrollbar_animation_controller_thinning.cc ('k') | cc/debug/frame_rate_counter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/animation/scrollbar_animation_controller_thinning_unittest.cc
diff --git a/cc/animation/scrollbar_animation_controller_thinning_unittest.cc b/cc/animation/scrollbar_animation_controller_thinning_unittest.cc
index 7bb507614ef733d5d72c21fd992897267425ef75..d838a2f7cf188de9f92fe808c8e184b7e96c5c66 100644
--- a/cc/animation/scrollbar_animation_controller_thinning_unittest.cc
+++ b/cc/animation/scrollbar_animation_controller_thinning_unittest.cc
@@ -8,6 +8,7 @@
#include "cc/test/fake_impl_proxy.h"
#include "cc/test/fake_layer_tree_host_impl.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "ui/gfx/frame_time.h"
namespace cc {
namespace {
@@ -44,13 +45,13 @@ class ScrollbarAnimationControllerThinningTest : public testing::Test {
};
TEST_F(ScrollbarAnimationControllerThinningTest, Idle) {
- scrollbar_controller_->Animate(base::TimeTicks());
+ scrollbar_controller_->Animate(gfx::FrameTime());
EXPECT_FLOAT_EQ(0.7f, scrollbar_layer_->opacity());
EXPECT_FLOAT_EQ(0.4f, scrollbar_layer_->thumb_thickness_scale_factor());
}
TEST_F(ScrollbarAnimationControllerThinningTest, AwakenByScrollGesture) {
- base::TimeTicks time;
+ gfx::FrameTime time;
time += base::TimeDelta::FromSeconds(1);
scrollbar_controller_->DidScrollGestureBegin();
EXPECT_FALSE(scrollbar_controller_->IsAnimating());
@@ -118,7 +119,7 @@ TEST_F(ScrollbarAnimationControllerThinningTest, AwakenByScrollGesture) {
}
TEST_F(ScrollbarAnimationControllerThinningTest, AwakenByProgrammaticScroll) {
- base::TimeTicks time;
+ gfx::FrameTime time;
time += base::TimeDelta::FromSeconds(1);
EXPECT_TRUE(scrollbar_controller_->DidScrollUpdate(time));
EXPECT_TRUE(scrollbar_controller_->IsAnimating());
@@ -182,7 +183,7 @@ TEST_F(ScrollbarAnimationControllerThinningTest, AwakenByProgrammaticScroll) {
}
TEST_F(ScrollbarAnimationControllerThinningTest, MouseOverAndOut) {
- base::TimeTicks time;
+ gfx::FrameTime time;
time += base::TimeDelta::FromSeconds(1);
EXPECT_TRUE(scrollbar_controller_->DidScrollUpdate(time));
EXPECT_TRUE(scrollbar_controller_->IsAnimating());
« no previous file with comments | « cc/animation/scrollbar_animation_controller_thinning.cc ('k') | cc/debug/frame_rate_counter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698