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

Unified Diff: ui/compositor/transform_animation_curve_adapter_unittest.cc

Issue 2971503002: Transform animations should not collapse by default when interpolating (Closed)
Patch Set: . Created 3 years, 5 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 | « ui/compositor/transform_animation_curve_adapter.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/transform_animation_curve_adapter_unittest.cc
diff --git a/ui/compositor/transform_animation_curve_adapter_unittest.cc b/ui/compositor/transform_animation_curve_adapter_unittest.cc
index 10ee66811f318b9a5585849c5065c7316ef447cc..b5b44e9027011fa8324405e756c3d95e6608e708 100644
--- a/ui/compositor/transform_animation_curve_adapter_unittest.cc
+++ b/ui/compositor/transform_animation_curve_adapter_unittest.cc
@@ -31,29 +31,28 @@ TEST(InverseTransformCurveAdapterTest, InversesTransform) {
const gfx::Transform effective_child_transform =
parent_start * child_transform;
- TransformAnimationCurveAdapter parent_curve(gfx::Tween::LINEAR,
- parent_start,
- parent_target,
- duration);
+ TransformAnimationCurveAdapter parent_curve(gfx::Tween::LINEAR, parent_start,
+ parent_target, duration);
- InverseTransformCurveAdapter child_curve(parent_curve,
- child_transform,
+ InverseTransformCurveAdapter child_curve(parent_curve, child_transform,
duration);
static const int kSteps = 1000;
double step = 1.0 / kSteps;
- for (int i = 0; i <= kSteps ; ++i) {
+ for (int i = 0; i <= kSteps; ++i) {
base::TimeDelta time_step = cc::TimeUtil::Scale(duration, i * step);
std::ostringstream message;
message << "Step " << i << " of " << kSteps;
SCOPED_TRACE(message.str());
- gfx::Transform progress_parent_transform = parent_curve.GetValue(time_step);
- gfx::Transform progress_child_transform = child_curve.GetValue(time_step);
- CheckApproximatelyEqual(effective_child_transform,
- progress_parent_transform *
- progress_child_transform);
+ gfx::Transform progress_parent_transform =
+ parent_curve.GetValue(time_step).Apply();
+ gfx::Transform progress_child_transform =
+ child_curve.GetValue(time_step).Apply();
+ CheckApproximatelyEqual(
+ effective_child_transform,
+ progress_parent_transform * progress_child_transform);
}
}
-} // namespace
+} // namespace
-} // namespace ui
+} // namespace ui
« no previous file with comments | « ui/compositor/transform_animation_curve_adapter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698