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

Unified Diff: Source/core/animation/AnimationTest.cpp

Issue 182063005: Web Animations API: Refactor IDL input conversion out of Animation (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Move timing input conversion from Animation into Timing Created 6 years, 10 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: Source/core/animation/AnimationTest.cpp
diff --git a/Source/core/animation/AnimationTest.cpp b/Source/core/animation/AnimationTest.cpp
index beaae605149f07786aca0f6cc05fe5247f832345..3f76b5117629380aec6a91417cc692788f164681 100644
--- a/Source/core/animation/AnimationTest.cpp
+++ b/Source/core/animation/AnimationTest.cpp
@@ -12,6 +12,7 @@
#include "core/animation/AnimationTestHelper.h"
#include "core/animation/DocumentTimeline.h"
#include "core/animation/KeyframeEffectModel.h"
+#include "core/animation/Timing.h"
#include "platform/animation/TimingFunctionTestHelper.h"
#include <gtest/gtest.h>
@@ -43,25 +44,16 @@ protected:
{
}
+ template<typename T = double>
+ static PassRefPtr<Animation> createAnimation(Element* element, Vector<Dictionary> keyframeDictionaryVector, T timingInput = Timing::initialIterationDuration())
+ {
+ return Animation::create(element, Animation::convertEffectInput(element, keyframeDictionaryVector, true), timingInput);
+ }
+
v8::Isolate* isolate;
v8::HandleScope scope;
v8::Local<v8::Context> context;
v8::Context::Scope contextScope;
-
- PassRefPtr<Animation> createAnimation(Element* element, Vector<Dictionary> keyframeDictionaryVector, Dictionary timingInput)
- {
- return Animation::createUnsafe(element, keyframeDictionaryVector, timingInput);
- }
-
- PassRefPtr<Animation> createAnimation(Element* element, Vector<Dictionary> keyframeDictionaryVector, double timingInput)
- {
- return Animation::createUnsafe(element, keyframeDictionaryVector, timingInput);
- }
-
- PassRefPtr<Animation> createAnimation(Element* element, Vector<Dictionary> keyframeDictionaryVector)
- {
- return Animation::createUnsafe(element, keyframeDictionaryVector);
- }
};
TEST_F(AnimationAnimationV8Test, CanCreateAnAnimation)

Powered by Google App Engine
This is Rietveld 408576698