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

Unified Diff: cc/animation/layer_animation_controller_unittest.cc

Issue 642983003: cc: Make PictureLayerImpl use a better choice for animated raster scale. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: animationscale: fixes Created 6 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
Index: cc/animation/layer_animation_controller_unittest.cc
diff --git a/cc/animation/layer_animation_controller_unittest.cc b/cc/animation/layer_animation_controller_unittest.cc
index de2176207f95157e89d5abc59a278f1c25df7088..d865095f4c99cfa5e75c8bef9e46d8af76bd56d9 100644
--- a/cc/animation/layer_animation_controller_unittest.cc
+++ b/cc/animation/layer_animation_controller_unittest.cc
@@ -1890,12 +1890,12 @@ TEST(LayerAnimationControllerTest, HasOnlyTranslationTransforms) {
EXPECT_TRUE(controller_impl->HasOnlyTranslationTransforms());
}
-TEST(LayerAnimationControllerTest, MaximumScale) {
+TEST(LayerAnimationControllerTest, MaximumTargetScale) {
scoped_refptr<LayerAnimationController> controller_impl(
LayerAnimationController::Create(0));
float max_scale = 0.f;
- EXPECT_TRUE(controller_impl->MaximumScale(&max_scale));
+ EXPECT_TRUE(controller_impl->MaximumTargetScale(&max_scale));
EXPECT_EQ(0.f, max_scale);
scoped_ptr<KeyframedTransformAnimationCurve> curve1(
@@ -1912,7 +1912,7 @@ TEST(LayerAnimationControllerTest, MaximumScale) {
Animation::Create(curve1.Pass(), 1, 1, Animation::Transform));
controller_impl->AddAnimation(animation.Pass());
- EXPECT_TRUE(controller_impl->MaximumScale(&max_scale));
+ EXPECT_TRUE(controller_impl->MaximumTargetScale(&max_scale));
EXPECT_EQ(4.f, max_scale);
scoped_ptr<KeyframedTransformAnimationCurve> curve2(
@@ -1928,7 +1928,7 @@ TEST(LayerAnimationControllerTest, MaximumScale) {
animation = Animation::Create(curve2.Pass(), 2, 2, Animation::Transform);
controller_impl->AddAnimation(animation.Pass());
- EXPECT_TRUE(controller_impl->MaximumScale(&max_scale));
+ EXPECT_TRUE(controller_impl->MaximumTargetScale(&max_scale));
EXPECT_EQ(6.f, max_scale);
scoped_ptr<KeyframedTransformAnimationCurve> curve3(
@@ -1944,7 +1944,7 @@ TEST(LayerAnimationControllerTest, MaximumScale) {
animation = Animation::Create(curve3.Pass(), 3, 3, Animation::Transform);
controller_impl->AddAnimation(animation.Pass());
- EXPECT_FALSE(controller_impl->MaximumScale(&max_scale));
+ EXPECT_FALSE(controller_impl->MaximumTargetScale(&max_scale));
controller_impl->GetAnimation(3, Animation::Transform)
->SetRunState(Animation::Finished, TicksFromSecondsF(0.0));
@@ -1952,8 +1952,8 @@ TEST(LayerAnimationControllerTest, MaximumScale) {
->SetRunState(Animation::Finished, TicksFromSecondsF(0.0));
// Only unfinished animations should be considered by
- // MaximumScale.
- EXPECT_TRUE(controller_impl->MaximumScale(&max_scale));
+ // MaximumTargetScale.
+ EXPECT_TRUE(controller_impl->MaximumTargetScale(&max_scale));
EXPECT_EQ(4.f, max_scale);
}

Powered by Google App Engine
This is Rietveld 408576698