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

Unified Diff: third_party/WebKit/Source/core/animation/KeyframeEffectTest.cpp

Issue 1906463002: Web Animations: Throw TypeErrors for invalid timing parameters (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unit tests Created 4 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: third_party/WebKit/Source/core/animation/KeyframeEffectTest.cpp
diff --git a/third_party/WebKit/Source/core/animation/KeyframeEffectTest.cpp b/third_party/WebKit/Source/core/animation/KeyframeEffectTest.cpp
index cb4c2bf630d3978fb766ee099c0ca5be6876b2dc..d9a50f86482c9a509a8558b57575b2260b8465c3 100644
--- a/third_party/WebKit/Source/core/animation/KeyframeEffectTest.cpp
+++ b/third_party/WebKit/Source/core/animation/KeyframeEffectTest.cpp
@@ -127,13 +127,6 @@ TEST_F(AnimationKeyframeEffectV8Test, CanOmitSpecifiedDuration)
EXPECT_TRUE(std::isnan(animation->specifiedTiming().iterationDuration));
}
-TEST_F(AnimationKeyframeEffectV8Test, NegativeDurationIsAuto)
-{
- Vector<Dictionary, 0> jsKeyframes;
- KeyframeEffect* animation = createAnimation(element.get(), jsKeyframes, -2, exceptionState);
- EXPECT_TRUE(std::isnan(animation->specifiedTiming().iterationDuration));
-}
-
TEST_F(AnimationKeyframeEffectV8Test, SpecifiedGetters)
{
Vector<Dictionary, 0> jsKeyframes;
@@ -219,11 +212,13 @@ TEST_F(AnimationKeyframeEffectV8Test, SpecifiedSetters)
EXPECT_EQ("backwards", specified->fill());
EXPECT_EQ(0, specified->iterationStart());
- specified->setIterationStart(2);
+ specified->setIterationStart(2, exceptionState);
+ ASSERT_FALSE(exceptionState.hadException());
EXPECT_EQ(2, specified->iterationStart());
EXPECT_EQ(1, specified->iterations());
- specified->setIterations(10);
+ specified->setIterations(10, exceptionState);
+ ASSERT_FALSE(exceptionState.hadException());
EXPECT_EQ(10, specified->iterations());
EXPECT_EQ(1, specified->playbackRate());
@@ -258,7 +253,8 @@ TEST_F(AnimationKeyframeEffectV8Test, SetSpecifiedDuration)
UnrestrictedDoubleOrString inDuration;
inDuration.setUnrestrictedDouble(2.5);
- specified->setDuration(inDuration);
+ specified->setDuration(inDuration, exceptionState);
+ ASSERT_FALSE(exceptionState.hadException());
UnrestrictedDoubleOrString duration2;
specified->duration(duration2);
EXPECT_TRUE(duration2.isUnrestrictedDouble());
« no previous file with comments | « third_party/WebKit/Source/core/animation/KeyframeEffect.cpp ('k') | third_party/WebKit/Source/core/animation/Timing.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698