| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/animation/KeyframeEffect.h" | 5 #include "core/animation/KeyframeEffect.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/Dictionary.h" | 7 #include "bindings/core/v8/Dictionary.h" |
| 8 #include "bindings/core/v8/EffectModelOrDictionarySequenceOrDictionary.h" | 8 #include "bindings/core/v8/EffectModelOrDictionarySequenceOrDictionary.h" |
| 9 #include "bindings/core/v8/V8BindingForTesting.h" | 9 #include "bindings/core/v8/V8BindingForTesting.h" |
| 10 #include "bindings/core/v8/V8KeyframeEffectOptions.h" | 10 #include "bindings/core/v8/V8KeyframeEffectOptions.h" |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 | 217 |
| 218 EXPECT_EQ(1, specified->playbackRate()); | 218 EXPECT_EQ(1, specified->playbackRate()); |
| 219 specified->setPlaybackRate(2); | 219 specified->setPlaybackRate(2); |
| 220 EXPECT_EQ(2, specified->playbackRate()); | 220 EXPECT_EQ(2, specified->playbackRate()); |
| 221 | 221 |
| 222 EXPECT_EQ("normal", specified->direction()); | 222 EXPECT_EQ("normal", specified->direction()); |
| 223 specified->setDirection("reverse"); | 223 specified->setDirection("reverse"); |
| 224 EXPECT_EQ("reverse", specified->direction()); | 224 EXPECT_EQ("reverse", specified->direction()); |
| 225 | 225 |
| 226 EXPECT_EQ("linear", specified->easing()); | 226 EXPECT_EQ("linear", specified->easing()); |
| 227 specified->setEasing("step-start", exceptionState); | 227 specified->setEasing(&document(), "step-start", exceptionState); |
| 228 ASSERT_FALSE(exceptionState.hadException()); | 228 ASSERT_FALSE(exceptionState.hadException()); |
| 229 EXPECT_EQ("step-start", specified->easing()); | 229 EXPECT_EQ("step-start", specified->easing()); |
| 230 } | 230 } |
| 231 | 231 |
| 232 TEST_F(AnimationKeyframeEffectV8Test, SetSpecifiedDuration) | 232 TEST_F(AnimationKeyframeEffectV8Test, SetSpecifiedDuration) |
| 233 { | 233 { |
| 234 V8TestingScope scope; | 234 V8TestingScope scope; |
| 235 Vector<Dictionary, 0> jsKeyframes; | 235 Vector<Dictionary, 0> jsKeyframes; |
| 236 v8::Local<v8::Object> timingInput = v8::Object::New(scope.isolate()); | 236 v8::Local<v8::Object> timingInput = v8::Object::New(scope.isolate()); |
| 237 KeyframeEffectOptions timingInputDictionary; | 237 KeyframeEffectOptions timingInputDictionary; |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 Timing timing; | 361 Timing timing; |
| 362 timing.iterationDuration = 5; | 362 timing.iterationDuration = 5; |
| 363 KeyframeEffect* animation = KeyframeEffect::create(element.get(), nullptr, t
iming); | 363 KeyframeEffect* animation = KeyframeEffect::create(element.get(), nullptr, t
iming); |
| 364 EXPECT_EQ(element.get(), animation->target()); | 364 EXPECT_EQ(element.get(), animation->target()); |
| 365 document().timeline().play(animation); | 365 document().timeline().play(animation); |
| 366 pageHolder.reset(); | 366 pageHolder.reset(); |
| 367 element.clear(); | 367 element.clear(); |
| 368 } | 368 } |
| 369 | 369 |
| 370 } // namespace blink | 370 } // namespace blink |
| OLD | NEW |