Index: ui/gfx/interpolated_transform_unittest.cc |
diff --git a/ui/gfx/interpolated_transform_unittest.cc b/ui/gfx/interpolated_transform_unittest.cc |
index 5215a8b07fe5589ab1ea578360c48387edf83991..af6be9d5af88544856f5afc2218f77339de33d9d 100644 |
--- a/ui/gfx/interpolated_transform_unittest.cc |
+++ b/ui/gfx/interpolated_transform_unittest.cc |
@@ -44,7 +44,7 @@ TEST(InterpolatedTransformTest, InterpolatedScale) { |
for (int i = 0; i <= 100; ++i) { |
gfx::Transform scale; |
- scale.Scale(i, i); |
+ scale.Scale3d(i, i, i); |
gfx::Transform interpolated = interpolated_scale.Interpolate(i / 100.0f); |
CheckApproximatelyEqual(scale, interpolated); |
interpolated = interpolated_scale_diff_start_end.Interpolate(i + 100); |
@@ -69,6 +69,23 @@ TEST(InterpolatedTransformTest, InterpolatedTranslate) { |
} |
} |
+TEST(InterpolatedTransformTest, InterpolatedTranslate3d) { |
+ ui::InterpolatedTranslation interpolated_xform(gfx::Point3F(0, 0, 0), |
+ gfx::Point3F(100, 100, 100)); |
+ |
+ ui::InterpolatedTranslation interpolated_xform_diff_start_end( |
+ gfx::Point3F(0, 0, 0), gfx::Point3F(100, 100, 100), 100, 200); |
+ |
+ for (int i = 0; i <= 100; ++i) { |
+ gfx::Transform xform; |
+ xform.Translate3d(i, i, i); |
+ gfx::Transform interpolated = interpolated_xform.Interpolate(i / 100.0f); |
+ CheckApproximatelyEqual(xform, interpolated); |
+ interpolated = interpolated_xform_diff_start_end.Interpolate(i + 100); |
+ CheckApproximatelyEqual(xform, interpolated); |
+ } |
+} |
+ |
TEST(InterpolatedTransformTest, InterpolatedRotationAboutPivot) { |
gfx::Point pivot(100, 100); |
gfx::Point above_pivot(100, 200); |