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

Side by Side Diff: third_party/WebKit/Source/core/animation/AnimationStackTest.cpp

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 unified diff | Download patch
OLDNEW
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/AnimationStack.h" 5 #include "core/animation/AnimationStack.h"
6 6
7 #include "core/animation/AnimationClock.h" 7 #include "core/animation/AnimationClock.h"
8 #include "core/animation/AnimationTimeline.h" 8 #include "core/animation/AnimationTimeline.h"
9 #include "core/animation/ElementAnimations.h" 9 #include "core/animation/ElementAnimations.h"
10 #include "core/animation/KeyframeEffectModel.h" 10 #include "core/animation/KeyframeEffectModel.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 return KeyframeEffect::create(element.get(), effect, timing); 72 return KeyframeEffect::create(element.get(), effect, timing);
73 } 73 }
74 74
75 AnimatableValue* interpolationValue(const ActiveInterpolationsMap& activeInt erpolations, CSSPropertyID id) 75 AnimatableValue* interpolationValue(const ActiveInterpolationsMap& activeInt erpolations, CSSPropertyID id)
76 { 76 {
77 Interpolation& interpolation = *activeInterpolations.get(PropertyHandle( id)).at(0); 77 Interpolation& interpolation = *activeInterpolations.get(PropertyHandle( id)).at(0);
78 return toLegacyStyleInterpolation(interpolation).currentValue().get(); 78 return toLegacyStyleInterpolation(interpolation).currentValue().get();
79 } 79 }
80 80
81 OwnPtr<DummyPageHolder> pageHolder; 81 OwnPtr<DummyPageHolder> pageHolder;
82 RefPtrWillBePersistent<Document> document; 82 Persistent<Document> document;
83 Persistent<AnimationTimeline> timeline; 83 Persistent<AnimationTimeline> timeline;
84 RefPtrWillBePersistent<Element> element; 84 Persistent<Element> element;
85 }; 85 };
86 86
87 TEST_F(AnimationAnimationStackTest, ElementAnimationsSorted) 87 TEST_F(AnimationAnimationStackTest, ElementAnimationsSorted)
88 { 88 {
89 play(makeKeyframeEffect(makeEffectModel(CSSPropertyFontSize, AnimatableDoubl e::create(1))), 10); 89 play(makeKeyframeEffect(makeEffectModel(CSSPropertyFontSize, AnimatableDoubl e::create(1))), 10);
90 play(makeKeyframeEffect(makeEffectModel(CSSPropertyFontSize, AnimatableDoubl e::create(2))), 15); 90 play(makeKeyframeEffect(makeEffectModel(CSSPropertyFontSize, AnimatableDoubl e::create(2))), 15);
91 play(makeKeyframeEffect(makeEffectModel(CSSPropertyFontSize, AnimatableDoubl e::create(3))), 5); 91 play(makeKeyframeEffect(makeEffectModel(CSSPropertyFontSize, AnimatableDoubl e::create(3))), 5);
92 ActiveInterpolationsMap result = AnimationStack::activeInterpolations(&eleme nt->elementAnimations()->animationStack(), 0, 0, KeyframeEffect::DefaultPriority ); 92 ActiveInterpolationsMap result = AnimationStack::activeInterpolations(&eleme nt->elementAnimations()->animationStack(), 0, 0, KeyframeEffect::DefaultPriority );
93 EXPECT_EQ(1u, result.size()); 93 EXPECT_EQ(1u, result.size());
94 EXPECT_TRUE(interpolationValue(result, CSSPropertyFontSize)->equals(Animatab leDouble::create(3).get())); 94 EXPECT_TRUE(interpolationValue(result, CSSPropertyFontSize)->equals(Animatab leDouble::create(3).get()));
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 ActiveInterpolationsMap result = AnimationStack::activeInterpolations(&eleme nt->elementAnimations()->animationStack(), 0, 0, KeyframeEffect::DefaultPriority ); 126 ActiveInterpolationsMap result = AnimationStack::activeInterpolations(&eleme nt->elementAnimations()->animationStack(), 0, 0, KeyframeEffect::DefaultPriority );
127 EXPECT_EQ(1u, result.size()); 127 EXPECT_EQ(1u, result.size());
128 EXPECT_TRUE(interpolationValue(result, CSSPropertyFontSize)->equals(Animatab leDouble::create(1).get())); 128 EXPECT_TRUE(interpolationValue(result, CSSPropertyFontSize)->equals(Animatab leDouble::create(1).get()));
129 129
130 animation->setEffect(0); 130 animation->setEffect(0);
131 result = AnimationStack::activeInterpolations(&element->elementAnimations()- >animationStack(), 0, 0, KeyframeEffect::DefaultPriority); 131 result = AnimationStack::activeInterpolations(&element->elementAnimations()- >animationStack(), 0, 0, KeyframeEffect::DefaultPriority);
132 EXPECT_EQ(0u, result.size()); 132 EXPECT_EQ(0u, result.size());
133 } 133 }
134 134
135 } // namespace blink 135 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698