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

Unified Diff: webkit/renderer/compositor_bindings/web_animation_unittest.cc

Issue 227733004: Handle direction control in compositor Animations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: new patch: fixes build failure in web_animation_unittest.cc Created 6 years, 8 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: webkit/renderer/compositor_bindings/web_animation_unittest.cc
diff --git a/webkit/renderer/compositor_bindings/web_animation_unittest.cc b/webkit/renderer/compositor_bindings/web_animation_unittest.cc
index e5be25a8860742a8f16862bc94f61865a9a1c5c4..2b3e288ff5c8c88b8e88569e88904847b32431a8 100644
--- a/webkit/renderer/compositor_bindings/web_animation_unittest.cc
+++ b/webkit/renderer/compositor_bindings/web_animation_unittest.cc
@@ -23,7 +23,11 @@ TEST(WebAnimationTest, DefaultSettings) {
EXPECT_EQ(1, animation->iterations());
EXPECT_EQ(0, animation->startTime());
EXPECT_EQ(0, animation->timeOffset());
+#if WEB_ANIMATION_SUPPORTS_FULL_DIRECTION
+ EXPECT_EQ(WebAnimation::DirectionNormal, animation->direction());
+#else
EXPECT_FALSE(animation->alternatesDirection());
+#endif
}
TEST(WebAnimationTest, ModifiedSettings) {
@@ -33,12 +37,20 @@ TEST(WebAnimationTest, ModifiedSettings) {
animation->setIterations(2);
animation->setStartTime(2);
animation->setTimeOffset(2);
+#if WEB_ANIMATION_SUPPORTS_FULL_DIRECTION
+ animation->setDirection(WebAnimation::DirectionReverse);
+#else
animation->setAlternatesDirection(true);
+#endif
EXPECT_EQ(2, animation->iterations());
EXPECT_EQ(2, animation->startTime());
EXPECT_EQ(2, animation->timeOffset());
+#if WEB_ANIMATION_SUPPORTS_FULL_DIRECTION
+ EXPECT_EQ(WebAnimation::DirectionReverse, animation->direction());
+#else
EXPECT_TRUE(animation->alternatesDirection());
+#endif
}
} // namespace

Powered by Google App Engine
This is Rietveld 408576698