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

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

Issue 2814523002: Web Animations: Coalesce constructors where possible. (Closed)
Patch Set: Rebase Created 3 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 5e0d0b26e6e6b0acd199454c53f1a0b5a11fed3d..3b7eb8742cb7cb2dd261cd96acd6fcf47a91e671 100644
--- a/third_party/WebKit/Source/core/animation/KeyframeEffectTest.cpp
+++ b/third_party/WebKit/Source/core/animation/KeyframeEffectTest.cpp
@@ -8,6 +8,7 @@
#include "bindings/core/v8/Dictionary.h"
#include "bindings/core/v8/DictionarySequenceOrDictionary.h"
+#include "bindings/core/v8/UnrestrictedDoubleOrKeyframeEffectOptions.h"
#include "bindings/core/v8/V8BindingForTesting.h"
#include "bindings/core/v8/V8KeyframeEffectOptions.h"
#include "core/animation/AnimationClock.h"
@@ -42,17 +43,31 @@ class KeyframeEffectTest : public ::testing::Test {
class AnimationKeyframeEffectV8Test : public KeyframeEffectTest {
protected:
- template <typename T>
static KeyframeEffect* CreateAnimation(
Element* element,
Vector<Dictionary> keyframe_dictionary_vector,
- T timing_input) {
+ double timing_input) {
NonThrowableExceptionState exception_state;
return KeyframeEffect::Create(
nullptr, element,
DictionarySequenceOrDictionary::fromDictionarySequence(
keyframe_dictionary_vector),
- timing_input, exception_state);
+ UnrestrictedDoubleOrKeyframeEffectOptions::fromUnrestrictedDouble(
+ timing_input),
+ exception_state);
+ }
+ static KeyframeEffect* CreateAnimation(
+ Element* element,
+ Vector<Dictionary> keyframe_dictionary_vector,
+ const KeyframeEffectOptions& timing_input) {
+ NonThrowableExceptionState exception_state;
+ return KeyframeEffect::Create(
+ nullptr, element,
+ DictionarySequenceOrDictionary::fromDictionarySequence(
+ keyframe_dictionary_vector),
+ UnrestrictedDoubleOrKeyframeEffectOptions::fromKeyframeEffectOptions(
+ timing_input),
+ exception_state);
}
static KeyframeEffect* CreateAnimation(
Element* element,

Powered by Google App Engine
This is Rietveld 408576698