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

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

Issue 2657443005: Migrate WTF::HashSet::add() to ::insert() [part 1 of N] (Closed)
Patch Set: Created 3 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/EffectStack.h" 5 #include "core/animation/EffectStack.h"
6 6
7 #include "core/animation/AnimationClock.h" 7 #include "core/animation/AnimationClock.h"
8 #include "core/animation/CompositorPendingAnimations.h" 8 #include "core/animation/CompositorPendingAnimations.h"
9 #include "core/animation/DocumentTimeline.h" 9 #include "core/animation/DocumentTimeline.h"
10 #include "core/animation/ElementAnimations.h" 10 #include "core/animation/ElementAnimations.h"
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 EXPECT_TRUE(interpolationValue(result, CSSPropertyZIndex) 127 EXPECT_TRUE(interpolationValue(result, CSSPropertyZIndex)
128 ->equals(AnimatableDouble::create(4).get())); 128 ->equals(AnimatableDouble::create(4).get()));
129 } 129 }
130 130
131 TEST_F(AnimationEffectStackTest, CancelledAnimations) { 131 TEST_F(AnimationEffectStackTest, CancelledAnimations) {
132 HeapHashSet<Member<const Animation>> cancelledAnimations; 132 HeapHashSet<Member<const Animation>> cancelledAnimations;
133 Animation* animation = 133 Animation* animation =
134 play(makeKeyframeEffect(makeEffectModel(CSSPropertyFontSize, 134 play(makeKeyframeEffect(makeEffectModel(CSSPropertyFontSize,
135 AnimatableDouble::create(1))), 135 AnimatableDouble::create(1))),
136 0); 136 0);
137 cancelledAnimations.add(animation); 137 cancelledAnimations.insert(animation);
138 play(makeKeyframeEffect( 138 play(makeKeyframeEffect(
139 makeEffectModel(CSSPropertyZIndex, AnimatableDouble::create(2))), 139 makeEffectModel(CSSPropertyZIndex, AnimatableDouble::create(2))),
140 0); 140 0);
141 ActiveInterpolationsMap result = EffectStack::activeInterpolations( 141 ActiveInterpolationsMap result = EffectStack::activeInterpolations(
142 &element->elementAnimations()->effectStack(), 0, &cancelledAnimations, 142 &element->elementAnimations()->effectStack(), 0, &cancelledAnimations,
143 KeyframeEffectReadOnly::DefaultPriority); 143 KeyframeEffectReadOnly::DefaultPriority);
144 EXPECT_EQ(1u, result.size()); 144 EXPECT_EQ(1u, result.size());
145 EXPECT_TRUE(interpolationValue(result, CSSPropertyZIndex) 145 EXPECT_TRUE(interpolationValue(result, CSSPropertyZIndex)
146 ->equals(AnimatableDouble::create(2).get())); 146 ->equals(AnimatableDouble::create(2).get()));
147 } 147 }
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 interpolations = EffectStack::activeInterpolations( 213 interpolations = EffectStack::activeInterpolations(
214 &element->elementAnimations()->effectStack(), nullptr, nullptr, 214 &element->elementAnimations()->effectStack(), nullptr, nullptr,
215 KeyframeEffectReadOnly::DefaultPriority); 215 KeyframeEffectReadOnly::DefaultPriority);
216 EXPECT_EQ(1u, interpolations.size()); 216 EXPECT_EQ(1u, interpolations.size());
217 EXPECT_TRUE(interpolationValue(interpolations, CSSPropertyFontSize) 217 EXPECT_TRUE(interpolationValue(interpolations, CSSPropertyFontSize)
218 ->equals(AnimatableDouble::create(3).get())); 218 ->equals(AnimatableDouble::create(3).get()));
219 EXPECT_EQ(1u, sampledEffectCount()); 219 EXPECT_EQ(1u, sampledEffectCount());
220 } 220 }
221 221
222 } // namespace blink 222 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698