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

Unified Diff: ui/gfx/animation/tween_unittest.cc

Issue 2966793002: NOT FOR REVIEW - convert to cc animation
Patch Set: switch to transform operations Created 3 years, 6 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/gfx/animation/tween.cc ('k') | ui/gfx/test/gfx_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/animation/tween_unittest.cc
diff --git a/ui/gfx/animation/tween_unittest.cc b/ui/gfx/animation/tween_unittest.cc
index 1871fc9b8297ec0c895b4e9591fd6c51bbcb28d0..9a39f8e30cbc8623ff137857b3a3ef2a3f14ee14 100644
--- a/ui/gfx/animation/tween_unittest.cc
+++ b/ui/gfx/animation/tween_unittest.cc
@@ -155,5 +155,25 @@ TEST(TweenTest, ClampedFloatValueBetweenTimeTicks) {
EXPECT_EQ(v2, Tween::ClampedFloatValueBetween(t_after, from, v1, to, v2));
}
+TEST(TweenTest, SizeValueBetween) {
+ const gfx::SizeF s1(12.0f, 24.0f);
+ const gfx::SizeF s2(36.0f, 48.0f);
+
+ double before = -0.125;
+ double from = 0.0;
+ double between = 0.5;
+ double to = 1.0;
+ double after = 1.125;
+
+ EXPECT_SIZEF_EQ(gfx::SizeF(9.0f, 21.0f),
+ Tween::SizeValueBetween(before, s1, s2));
+ EXPECT_SIZEF_EQ(s1, Tween::SizeValueBetween(from, s1, s2));
+ EXPECT_SIZEF_EQ(gfx::SizeF(24.0f, 36.0f),
+ Tween::SizeValueBetween(between, s1, s2));
+ EXPECT_SIZEF_EQ(s2, Tween::SizeValueBetween(to, s1, s2));
+ EXPECT_SIZEF_EQ(gfx::SizeF(39.0f, 51.0f),
+ Tween::SizeValueBetween(after, s1, s2));
+}
+
} // namespace
} // namespace gfx
« no previous file with comments | « ui/gfx/animation/tween.cc ('k') | ui/gfx/test/gfx_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698