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

Side by Side Diff: Source/core/animation/KeyframeEffectModelTest.cpp

Issue 984153002: Fix template angle bracket syntax in animation (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 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 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 80
81 double actualValue; 81 double actualValue;
82 if (value->isLength()) 82 if (value->isLength())
83 actualValue = toAnimatableLength(value.get())->length(1, ValueRangeAll). value(); 83 actualValue = toAnimatableLength(value.get())->length(1, ValueRangeAll). value();
84 else 84 else
85 actualValue = toCSSPrimitiveValue(toAnimatableUnknown(value.get())->toCS SValue().get())->getDoubleValue(); 85 actualValue = toCSSPrimitiveValue(toAnimatableUnknown(value.get())->toCS SValue().get())->getDoubleValue();
86 86
87 EXPECT_FLOAT_EQ(static_cast<float>(expectedValue), actualValue); 87 EXPECT_FLOAT_EQ(static_cast<float>(expectedValue), actualValue);
88 } 88 }
89 89
90 Interpolation* findValue(WillBeHeapVector<RefPtrWillBeMember<Interpolation> >& v alues, CSSPropertyID id) 90 Interpolation* findValue(WillBeHeapVector<RefPtrWillBeMember<Interpolation>>& va lues, CSSPropertyID id)
91 { 91 {
92 for (auto& value : values) { 92 for (auto& value : values) {
93 if (toLegacyStyleInterpolation(value.get())->id() == id) 93 if (toLegacyStyleInterpolation(value.get())->id() == id)
94 return value.get(); 94 return value.get();
95 } 95 }
96 return 0; 96 return 0;
97 } 97 }
98 98
99 99
100 TEST(AnimationKeyframeEffectModel, BasicOperation) 100 TEST(AnimationKeyframeEffectModel, BasicOperation)
101 { 101 {
102 AnimatableValueKeyframeVector keyframes = keyframesAtZeroAndOne(unknownAnima tableValue(3.0), unknownAnimatableValue(5.0)); 102 AnimatableValueKeyframeVector keyframes = keyframesAtZeroAndOne(unknownAnima tableValue(3.0), unknownAnimatableValue(5.0));
103 RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableVa lueKeyframeEffectModel::create(keyframes); 103 RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableVa lueKeyframeEffectModel::create(keyframes);
104 OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > va lues = nullptr; 104 OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> valu es = nullptr;
105 effect->sample(0, 0.6, duration, values); 105 effect->sample(0, 0.6, duration, values);
106 ASSERT_EQ(1UL, values->size()); 106 ASSERT_EQ(1UL, values->size());
107 expectProperty(CSSPropertyLeft, values->at(0)); 107 expectProperty(CSSPropertyLeft, values->at(0));
108 expectDoubleValue(5.0, values->at(0)); 108 expectDoubleValue(5.0, values->at(0));
109 } 109 }
110 110
111 TEST(AnimationKeyframeEffectModel, CompositeReplaceNonInterpolable) 111 TEST(AnimationKeyframeEffectModel, CompositeReplaceNonInterpolable)
112 { 112 {
113 AnimatableValueKeyframeVector keyframes = keyframesAtZeroAndOne(unknownAnima tableValue(3.0), unknownAnimatableValue(5.0)); 113 AnimatableValueKeyframeVector keyframes = keyframesAtZeroAndOne(unknownAnima tableValue(3.0), unknownAnimatableValue(5.0));
114 keyframes[0]->setComposite(AnimationEffect::CompositeReplace); 114 keyframes[0]->setComposite(AnimationEffect::CompositeReplace);
115 keyframes[1]->setComposite(AnimationEffect::CompositeReplace); 115 keyframes[1]->setComposite(AnimationEffect::CompositeReplace);
116 RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableVa lueKeyframeEffectModel::create(keyframes); 116 RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableVa lueKeyframeEffectModel::create(keyframes);
117 OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > va lues = nullptr; 117 OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> valu es = nullptr;
118 effect->sample(0, 0.6, duration, values); 118 effect->sample(0, 0.6, duration, values);
119 expectDoubleValue(5.0, values->at(0)); 119 expectDoubleValue(5.0, values->at(0));
120 } 120 }
121 121
122 TEST(AnimationKeyframeEffectModel, CompositeReplace) 122 TEST(AnimationKeyframeEffectModel, CompositeReplace)
123 { 123 {
124 AnimatableValueKeyframeVector keyframes = keyframesAtZeroAndOne(pixelAnimata bleValue(3.0), pixelAnimatableValue(5.0)); 124 AnimatableValueKeyframeVector keyframes = keyframesAtZeroAndOne(pixelAnimata bleValue(3.0), pixelAnimatableValue(5.0));
125 keyframes[0]->setComposite(AnimationEffect::CompositeReplace); 125 keyframes[0]->setComposite(AnimationEffect::CompositeReplace);
126 keyframes[1]->setComposite(AnimationEffect::CompositeReplace); 126 keyframes[1]->setComposite(AnimationEffect::CompositeReplace);
127 RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableVa lueKeyframeEffectModel::create(keyframes); 127 RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableVa lueKeyframeEffectModel::create(keyframes);
128 OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > va lues = nullptr; 128 OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> valu es = nullptr;
129 effect->sample(0, 0.6, duration, values); 129 effect->sample(0, 0.6, duration, values);
130 expectDoubleValue(3.0 * 0.4 + 5.0 * 0.6, values->at(0)); 130 expectDoubleValue(3.0 * 0.4 + 5.0 * 0.6, values->at(0));
131 } 131 }
132 132
133 // FIXME: Re-enable this test once compositing of CompositeAdd is supported. 133 // FIXME: Re-enable this test once compositing of CompositeAdd is supported.
134 TEST(AnimationKeyframeEffectModel, DISABLED_CompositeAdd) 134 TEST(AnimationKeyframeEffectModel, DISABLED_CompositeAdd)
135 { 135 {
136 AnimatableValueKeyframeVector keyframes = keyframesAtZeroAndOne(pixelAnimata bleValue(3.0), pixelAnimatableValue(5.0)); 136 AnimatableValueKeyframeVector keyframes = keyframesAtZeroAndOne(pixelAnimata bleValue(3.0), pixelAnimatableValue(5.0));
137 keyframes[0]->setComposite(AnimationEffect::CompositeAdd); 137 keyframes[0]->setComposite(AnimationEffect::CompositeAdd);
138 keyframes[1]->setComposite(AnimationEffect::CompositeAdd); 138 keyframes[1]->setComposite(AnimationEffect::CompositeAdd);
139 RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableVa lueKeyframeEffectModel::create(keyframes); 139 RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableVa lueKeyframeEffectModel::create(keyframes);
140 OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > va lues = nullptr; 140 OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> valu es = nullptr;
141 effect->sample(0, 0.6, duration, values); 141 effect->sample(0, 0.6, duration, values);
142 expectDoubleValue((7.0 + 3.0) * 0.4 + (7.0 + 5.0) * 0.6, values->at(0)); 142 expectDoubleValue((7.0 + 3.0) * 0.4 + (7.0 + 5.0) * 0.6, values->at(0));
143 } 143 }
144 144
145 TEST(AnimationKeyframeEffectModel, CompositeEaseIn) 145 TEST(AnimationKeyframeEffectModel, CompositeEaseIn)
146 { 146 {
147 AnimatableValueKeyframeVector keyframes = keyframesAtZeroAndOne(pixelAnimata bleValue(3.0), pixelAnimatableValue(5.0)); 147 AnimatableValueKeyframeVector keyframes = keyframesAtZeroAndOne(pixelAnimata bleValue(3.0), pixelAnimatableValue(5.0));
148 keyframes[0]->setComposite(AnimationEffect::CompositeReplace); 148 keyframes[0]->setComposite(AnimationEffect::CompositeReplace);
149 keyframes[0]->setEasing(CubicBezierTimingFunction::preset(CubicBezierTimingF unction::EaseIn)); 149 keyframes[0]->setEasing(CubicBezierTimingFunction::preset(CubicBezierTimingF unction::EaseIn));
150 keyframes[1]->setComposite(AnimationEffect::CompositeReplace); 150 keyframes[1]->setComposite(AnimationEffect::CompositeReplace);
151 RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableVa lueKeyframeEffectModel::create(keyframes); 151 RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableVa lueKeyframeEffectModel::create(keyframes);
152 OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > va lues = nullptr; 152 OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> valu es = nullptr;
153 effect->sample(0, 0.6, duration, values); 153 effect->sample(0, 0.6, duration, values);
154 expectDoubleValue(3.8579516, values->at(0)); 154 expectDoubleValue(3.8579516, values->at(0));
155 effect->sample(0, 0.6, duration * 100, values); 155 effect->sample(0, 0.6, duration * 100, values);
156 expectDoubleValue(3.8582394, values->at(0)); 156 expectDoubleValue(3.8582394, values->at(0));
157 } 157 }
158 158
159 TEST(AnimationKeyframeEffectModel, CompositeCubicBezier) 159 TEST(AnimationKeyframeEffectModel, CompositeCubicBezier)
160 { 160 {
161 AnimatableValueKeyframeVector keyframes = keyframesAtZeroAndOne(pixelAnimata bleValue(3.0), pixelAnimatableValue(5.0)); 161 AnimatableValueKeyframeVector keyframes = keyframesAtZeroAndOne(pixelAnimata bleValue(3.0), pixelAnimatableValue(5.0));
162 keyframes[0]->setComposite(AnimationEffect::CompositeReplace); 162 keyframes[0]->setComposite(AnimationEffect::CompositeReplace);
163 keyframes[0]->setEasing(CubicBezierTimingFunction::create(0.42, 0, 0.58, 1)) ; 163 keyframes[0]->setEasing(CubicBezierTimingFunction::create(0.42, 0, 0.58, 1)) ;
164 keyframes[1]->setComposite(AnimationEffect::CompositeReplace); 164 keyframes[1]->setComposite(AnimationEffect::CompositeReplace);
165 RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableVa lueKeyframeEffectModel::create(keyframes); 165 RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableVa lueKeyframeEffectModel::create(keyframes);
166 OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > va lues = nullptr; 166 OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> valu es = nullptr;
167 effect->sample(0, 0.6, duration, values); 167 effect->sample(0, 0.6, duration, values);
168 expectDoubleValue(4.3363357, values->at(0)); 168 expectDoubleValue(4.3363357, values->at(0));
169 effect->sample(0, 0.6, duration * 1000, values); 169 effect->sample(0, 0.6, duration * 1000, values);
170 expectDoubleValue(4.3362322, values->at(0)); 170 expectDoubleValue(4.3362322, values->at(0));
171 } 171 }
172 172
173 TEST(AnimationKeyframeEffectModel, ExtrapolateReplaceNonInterpolable) 173 TEST(AnimationKeyframeEffectModel, ExtrapolateReplaceNonInterpolable)
174 { 174 {
175 AnimatableValueKeyframeVector keyframes = keyframesAtZeroAndOne(unknownAnima tableValue(3.0), unknownAnimatableValue(5.0)); 175 AnimatableValueKeyframeVector keyframes = keyframesAtZeroAndOne(unknownAnima tableValue(3.0), unknownAnimatableValue(5.0));
176 keyframes[0]->setComposite(AnimationEffect::CompositeReplace); 176 keyframes[0]->setComposite(AnimationEffect::CompositeReplace);
177 keyframes[1]->setComposite(AnimationEffect::CompositeReplace); 177 keyframes[1]->setComposite(AnimationEffect::CompositeReplace);
178 RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableVa lueKeyframeEffectModel::create(keyframes); 178 RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableVa lueKeyframeEffectModel::create(keyframes);
179 OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > va lues = nullptr; 179 OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> valu es = nullptr;
180 effect->sample(0, 1.6, duration, values); 180 effect->sample(0, 1.6, duration, values);
181 expectDoubleValue(5.0, values->at(0)); 181 expectDoubleValue(5.0, values->at(0));
182 } 182 }
183 183
184 TEST(AnimationKeyframeEffectModel, ExtrapolateReplace) 184 TEST(AnimationKeyframeEffectModel, ExtrapolateReplace)
185 { 185 {
186 AnimatableValueKeyframeVector keyframes = keyframesAtZeroAndOne(pixelAnimata bleValue(3.0), pixelAnimatableValue(5.0)); 186 AnimatableValueKeyframeVector keyframes = keyframesAtZeroAndOne(pixelAnimata bleValue(3.0), pixelAnimatableValue(5.0));
187 RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableVa lueKeyframeEffectModel::create(keyframes); 187 RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableVa lueKeyframeEffectModel::create(keyframes);
188 keyframes[0]->setComposite(AnimationEffect::CompositeReplace); 188 keyframes[0]->setComposite(AnimationEffect::CompositeReplace);
189 keyframes[1]->setComposite(AnimationEffect::CompositeReplace); 189 keyframes[1]->setComposite(AnimationEffect::CompositeReplace);
190 OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > va lues = nullptr; 190 OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> valu es = nullptr;
191 effect->sample(0, 1.6, duration, values); 191 effect->sample(0, 1.6, duration, values);
192 expectDoubleValue(3.0 * -0.6 + 5.0 * 1.6, values->at(0)); 192 expectDoubleValue(3.0 * -0.6 + 5.0 * 1.6, values->at(0));
193 } 193 }
194 194
195 // FIXME: Re-enable this test once compositing of CompositeAdd is supported. 195 // FIXME: Re-enable this test once compositing of CompositeAdd is supported.
196 TEST(AnimationKeyframeEffectModel, DISABLED_ExtrapolateAdd) 196 TEST(AnimationKeyframeEffectModel, DISABLED_ExtrapolateAdd)
197 { 197 {
198 AnimatableValueKeyframeVector keyframes = keyframesAtZeroAndOne(pixelAnimata bleValue(3.0), pixelAnimatableValue(5.0)); 198 AnimatableValueKeyframeVector keyframes = keyframesAtZeroAndOne(pixelAnimata bleValue(3.0), pixelAnimatableValue(5.0));
199 keyframes[0]->setComposite(AnimationEffect::CompositeAdd); 199 keyframes[0]->setComposite(AnimationEffect::CompositeAdd);
200 keyframes[1]->setComposite(AnimationEffect::CompositeAdd); 200 keyframes[1]->setComposite(AnimationEffect::CompositeAdd);
201 RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableVa lueKeyframeEffectModel::create(keyframes); 201 RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableVa lueKeyframeEffectModel::create(keyframes);
202 OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > va lues = nullptr; 202 OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> valu es = nullptr;
203 effect->sample(0, 1.6, duration, values); 203 effect->sample(0, 1.6, duration, values);
204 expectDoubleValue((7.0 + 3.0) * -0.6 + (7.0 + 5.0) * 1.6, values->at(0)); 204 expectDoubleValue((7.0 + 3.0) * -0.6 + (7.0 + 5.0) * 1.6, values->at(0));
205 } 205 }
206 206
207 TEST(AnimationKeyframeEffectModel, ZeroKeyframes) 207 TEST(AnimationKeyframeEffectModel, ZeroKeyframes)
208 { 208 {
209 RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableVa lueKeyframeEffectModel::create(AnimatableValueKeyframeVector()); 209 RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableVa lueKeyframeEffectModel::create(AnimatableValueKeyframeVector());
210 OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > va lues = nullptr; 210 OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> valu es = nullptr;
211 effect->sample(0, 0.5, duration, values); 211 effect->sample(0, 0.5, duration, values);
212 EXPECT_TRUE(values->isEmpty()); 212 EXPECT_TRUE(values->isEmpty());
213 } 213 }
214 214
215 // FIXME: Re-enable this test once compositing of CompositeAdd is supported. 215 // FIXME: Re-enable this test once compositing of CompositeAdd is supported.
216 TEST(AnimationKeyframeEffectModel, DISABLED_SingleKeyframeAtOffsetZero) 216 TEST(AnimationKeyframeEffectModel, DISABLED_SingleKeyframeAtOffsetZero)
217 { 217 {
218 AnimatableValueKeyframeVector keyframes(1); 218 AnimatableValueKeyframeVector keyframes(1);
219 keyframes[0] = AnimatableValueKeyframe::create(); 219 keyframes[0] = AnimatableValueKeyframe::create();
220 keyframes[0]->setOffset(0.0); 220 keyframes[0]->setOffset(0.0);
221 keyframes[0]->setPropertyValue(CSSPropertyLeft, unknownAnimatableValue(3.0). get()); 221 keyframes[0]->setPropertyValue(CSSPropertyLeft, unknownAnimatableValue(3.0). get());
222 222
223 RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableVa lueKeyframeEffectModel::create(keyframes); 223 RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableVa lueKeyframeEffectModel::create(keyframes);
224 OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > va lues = nullptr; 224 OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> valu es = nullptr;
225 effect->sample(0, 0.6, duration, values); 225 effect->sample(0, 0.6, duration, values);
226 expectDoubleValue(3.0, values->at(0)); 226 expectDoubleValue(3.0, values->at(0));
227 } 227 }
228 228
229 // FIXME: Re-enable this test once compositing of CompositeAdd is supported. 229 // FIXME: Re-enable this test once compositing of CompositeAdd is supported.
230 TEST(AnimationKeyframeEffectModel, DISABLED_SingleKeyframeAtOffsetOne) 230 TEST(AnimationKeyframeEffectModel, DISABLED_SingleKeyframeAtOffsetOne)
231 { 231 {
232 AnimatableValueKeyframeVector keyframes(1); 232 AnimatableValueKeyframeVector keyframes(1);
233 keyframes[0] = AnimatableValueKeyframe::create(); 233 keyframes[0] = AnimatableValueKeyframe::create();
234 keyframes[0]->setOffset(1.0); 234 keyframes[0]->setOffset(1.0);
235 keyframes[0]->setPropertyValue(CSSPropertyLeft, pixelAnimatableValue(5.0).ge t()); 235 keyframes[0]->setPropertyValue(CSSPropertyLeft, pixelAnimatableValue(5.0).ge t());
236 236
237 RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableVa lueKeyframeEffectModel::create(keyframes); 237 RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableVa lueKeyframeEffectModel::create(keyframes);
238 OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > va lues = nullptr; 238 OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> valu es = nullptr;
239 effect->sample(0, 0.6, duration, values); 239 effect->sample(0, 0.6, duration, values);
240 expectDoubleValue(7.0 * 0.4 + 5.0 * 0.6, values->at(0)); 240 expectDoubleValue(7.0 * 0.4 + 5.0 * 0.6, values->at(0));
241 } 241 }
242 242
243 TEST(AnimationKeyframeEffectModel, MoreThanTwoKeyframes) 243 TEST(AnimationKeyframeEffectModel, MoreThanTwoKeyframes)
244 { 244 {
245 AnimatableValueKeyframeVector keyframes(3); 245 AnimatableValueKeyframeVector keyframes(3);
246 keyframes[0] = AnimatableValueKeyframe::create(); 246 keyframes[0] = AnimatableValueKeyframe::create();
247 keyframes[0]->setOffset(0.0); 247 keyframes[0]->setOffset(0.0);
248 keyframes[0]->setPropertyValue(CSSPropertyLeft, unknownAnimatableValue(3.0). get()); 248 keyframes[0]->setPropertyValue(CSSPropertyLeft, unknownAnimatableValue(3.0). get());
249 keyframes[1] = AnimatableValueKeyframe::create(); 249 keyframes[1] = AnimatableValueKeyframe::create();
250 keyframes[1]->setOffset(0.5); 250 keyframes[1]->setOffset(0.5);
251 keyframes[1]->setPropertyValue(CSSPropertyLeft, unknownAnimatableValue(4.0). get()); 251 keyframes[1]->setPropertyValue(CSSPropertyLeft, unknownAnimatableValue(4.0). get());
252 keyframes[2] = AnimatableValueKeyframe::create(); 252 keyframes[2] = AnimatableValueKeyframe::create();
253 keyframes[2]->setOffset(1.0); 253 keyframes[2]->setOffset(1.0);
254 keyframes[2]->setPropertyValue(CSSPropertyLeft, unknownAnimatableValue(5.0). get()); 254 keyframes[2]->setPropertyValue(CSSPropertyLeft, unknownAnimatableValue(5.0). get());
255 255
256 RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableVa lueKeyframeEffectModel::create(keyframes); 256 RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableVa lueKeyframeEffectModel::create(keyframes);
257 OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > va lues = nullptr; 257 OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> valu es = nullptr;
258 effect->sample(0, 0.3, duration, values); 258 effect->sample(0, 0.3, duration, values);
259 expectDoubleValue(4.0, values->at(0)); 259 expectDoubleValue(4.0, values->at(0));
260 effect->sample(0, 0.8, duration, values); 260 effect->sample(0, 0.8, duration, values);
261 expectDoubleValue(5.0, values->at(0)); 261 expectDoubleValue(5.0, values->at(0));
262 } 262 }
263 263
264 TEST(AnimationKeyframeEffectModel, EndKeyframeOffsetsUnspecified) 264 TEST(AnimationKeyframeEffectModel, EndKeyframeOffsetsUnspecified)
265 { 265 {
266 AnimatableValueKeyframeVector keyframes(3); 266 AnimatableValueKeyframeVector keyframes(3);
267 keyframes[0] = AnimatableValueKeyframe::create(); 267 keyframes[0] = AnimatableValueKeyframe::create();
268 keyframes[0]->setPropertyValue(CSSPropertyLeft, unknownAnimatableValue(3.0). get()); 268 keyframes[0]->setPropertyValue(CSSPropertyLeft, unknownAnimatableValue(3.0). get());
269 keyframes[1] = AnimatableValueKeyframe::create(); 269 keyframes[1] = AnimatableValueKeyframe::create();
270 keyframes[1]->setOffset(0.5); 270 keyframes[1]->setOffset(0.5);
271 keyframes[1]->setPropertyValue(CSSPropertyLeft, unknownAnimatableValue(4.0). get()); 271 keyframes[1]->setPropertyValue(CSSPropertyLeft, unknownAnimatableValue(4.0). get());
272 keyframes[2] = AnimatableValueKeyframe::create(); 272 keyframes[2] = AnimatableValueKeyframe::create();
273 keyframes[2]->setPropertyValue(CSSPropertyLeft, unknownAnimatableValue(5.0). get()); 273 keyframes[2]->setPropertyValue(CSSPropertyLeft, unknownAnimatableValue(5.0). get());
274 274
275 RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableVa lueKeyframeEffectModel::create(keyframes); 275 RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableVa lueKeyframeEffectModel::create(keyframes);
276 OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > va lues = nullptr; 276 OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> valu es = nullptr;
277 effect->sample(0, 0.1, duration, values); 277 effect->sample(0, 0.1, duration, values);
278 expectDoubleValue(3.0, values->at(0)); 278 expectDoubleValue(3.0, values->at(0));
279 effect->sample(0, 0.6, duration, values); 279 effect->sample(0, 0.6, duration, values);
280 expectDoubleValue(4.0, values->at(0)); 280 expectDoubleValue(4.0, values->at(0));
281 effect->sample(0, 0.9, duration, values); 281 effect->sample(0, 0.9, duration, values);
282 expectDoubleValue(5.0, values->at(0)); 282 expectDoubleValue(5.0, values->at(0));
283 } 283 }
284 284
285 TEST(AnimationKeyframeEffectModel, SampleOnKeyframe) 285 TEST(AnimationKeyframeEffectModel, SampleOnKeyframe)
286 { 286 {
287 AnimatableValueKeyframeVector keyframes(3); 287 AnimatableValueKeyframeVector keyframes(3);
288 keyframes[0] = AnimatableValueKeyframe::create(); 288 keyframes[0] = AnimatableValueKeyframe::create();
289 keyframes[0]->setOffset(0.0); 289 keyframes[0]->setOffset(0.0);
290 keyframes[0]->setPropertyValue(CSSPropertyLeft, unknownAnimatableValue(3.0). get()); 290 keyframes[0]->setPropertyValue(CSSPropertyLeft, unknownAnimatableValue(3.0). get());
291 keyframes[1] = AnimatableValueKeyframe::create(); 291 keyframes[1] = AnimatableValueKeyframe::create();
292 keyframes[1]->setOffset(0.5); 292 keyframes[1]->setOffset(0.5);
293 keyframes[1]->setPropertyValue(CSSPropertyLeft, unknownAnimatableValue(4.0). get()); 293 keyframes[1]->setPropertyValue(CSSPropertyLeft, unknownAnimatableValue(4.0). get());
294 keyframes[2] = AnimatableValueKeyframe::create(); 294 keyframes[2] = AnimatableValueKeyframe::create();
295 keyframes[2]->setOffset(1.0); 295 keyframes[2]->setOffset(1.0);
296 keyframes[2]->setPropertyValue(CSSPropertyLeft, unknownAnimatableValue(5.0). get()); 296 keyframes[2]->setPropertyValue(CSSPropertyLeft, unknownAnimatableValue(5.0). get());
297 297
298 RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableVa lueKeyframeEffectModel::create(keyframes); 298 RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableVa lueKeyframeEffectModel::create(keyframes);
299 OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > va lues = nullptr; 299 OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> valu es = nullptr;
300 effect->sample(0, 0.0, duration, values); 300 effect->sample(0, 0.0, duration, values);
301 expectDoubleValue(3.0, values->at(0)); 301 expectDoubleValue(3.0, values->at(0));
302 effect->sample(0, 0.5, duration, values); 302 effect->sample(0, 0.5, duration, values);
303 expectDoubleValue(4.0, values->at(0)); 303 expectDoubleValue(4.0, values->at(0));
304 effect->sample(0, 1.0, duration, values); 304 effect->sample(0, 1.0, duration, values);
305 expectDoubleValue(5.0, values->at(0)); 305 expectDoubleValue(5.0, values->at(0));
306 } 306 }
307 307
308 TEST(AnimationKeyframeEffectModel, MultipleKeyframesWithSameOffset) 308 TEST(AnimationKeyframeEffectModel, MultipleKeyframesWithSameOffset)
309 { 309 {
(...skipping 20 matching lines...) Expand all
330 keyframes[6]->setOffset(0.9); 330 keyframes[6]->setOffset(0.9);
331 keyframes[6]->setPropertyValue(CSSPropertyLeft, unknownAnimatableValue(6.0). get()); 331 keyframes[6]->setPropertyValue(CSSPropertyLeft, unknownAnimatableValue(6.0). get());
332 keyframes[7] = AnimatableValueKeyframe::create(); 332 keyframes[7] = AnimatableValueKeyframe::create();
333 keyframes[7]->setOffset(0.9); 333 keyframes[7]->setOffset(0.9);
334 keyframes[7]->setPropertyValue(CSSPropertyLeft, unknownAnimatableValue(7.0). get()); 334 keyframes[7]->setPropertyValue(CSSPropertyLeft, unknownAnimatableValue(7.0). get());
335 keyframes[8] = AnimatableValueKeyframe::create(); 335 keyframes[8] = AnimatableValueKeyframe::create();
336 keyframes[8]->setOffset(1.0); 336 keyframes[8]->setOffset(1.0);
337 keyframes[8]->setPropertyValue(CSSPropertyLeft, unknownAnimatableValue(7.0). get()); 337 keyframes[8]->setPropertyValue(CSSPropertyLeft, unknownAnimatableValue(7.0). get());
338 338
339 RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableVa lueKeyframeEffectModel::create(keyframes); 339 RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableVa lueKeyframeEffectModel::create(keyframes);
340 OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > va lues = nullptr; 340 OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> valu es = nullptr;
341 effect->sample(0, 0.0, duration, values); 341 effect->sample(0, 0.0, duration, values);
342 expectDoubleValue(0.0, values->at(0)); 342 expectDoubleValue(0.0, values->at(0));
343 effect->sample(0, 0.2, duration, values); 343 effect->sample(0, 0.2, duration, values);
344 expectDoubleValue(2.0, values->at(0)); 344 expectDoubleValue(2.0, values->at(0));
345 effect->sample(0, 0.4, duration, values); 345 effect->sample(0, 0.4, duration, values);
346 expectDoubleValue(3.0, values->at(0)); 346 expectDoubleValue(3.0, values->at(0));
347 effect->sample(0, 0.5, duration, values); 347 effect->sample(0, 0.5, duration, values);
348 expectDoubleValue(5.0, values->at(0)); 348 expectDoubleValue(5.0, values->at(0));
349 effect->sample(0, 0.6, duration, values); 349 effect->sample(0, 0.6, duration, values);
350 expectDoubleValue(5.0, values->at(0)); 350 expectDoubleValue(5.0, values->at(0));
351 effect->sample(0, 0.8, duration, values); 351 effect->sample(0, 0.8, duration, values);
352 expectDoubleValue(6.0, values->at(0)); 352 expectDoubleValue(6.0, values->at(0));
353 effect->sample(0, 1.0, duration, values); 353 effect->sample(0, 1.0, duration, values);
354 expectDoubleValue(7.0, values->at(0)); 354 expectDoubleValue(7.0, values->at(0));
355 } 355 }
356 356
357 // FIXME: Re-enable this test once compositing of CompositeAdd is supported. 357 // FIXME: Re-enable this test once compositing of CompositeAdd is supported.
358 TEST(AnimationKeyframeEffectModel, DISABLED_PerKeyframeComposite) 358 TEST(AnimationKeyframeEffectModel, DISABLED_PerKeyframeComposite)
359 { 359 {
360 AnimatableValueKeyframeVector keyframes(2); 360 AnimatableValueKeyframeVector keyframes(2);
361 keyframes[0] = AnimatableValueKeyframe::create(); 361 keyframes[0] = AnimatableValueKeyframe::create();
362 keyframes[0]->setOffset(0.0); 362 keyframes[0]->setOffset(0.0);
363 keyframes[0]->setPropertyValue(CSSPropertyLeft, pixelAnimatableValue(3.0).ge t()); 363 keyframes[0]->setPropertyValue(CSSPropertyLeft, pixelAnimatableValue(3.0).ge t());
364 keyframes[1] = AnimatableValueKeyframe::create(); 364 keyframes[1] = AnimatableValueKeyframe::create();
365 keyframes[1]->setOffset(1.0); 365 keyframes[1]->setOffset(1.0);
366 keyframes[1]->setPropertyValue(CSSPropertyLeft, pixelAnimatableValue(5.0).ge t()); 366 keyframes[1]->setPropertyValue(CSSPropertyLeft, pixelAnimatableValue(5.0).ge t());
367 keyframes[1]->setComposite(AnimationEffect::CompositeAdd); 367 keyframes[1]->setComposite(AnimationEffect::CompositeAdd);
368 368
369 RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableVa lueKeyframeEffectModel::create(keyframes); 369 RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableVa lueKeyframeEffectModel::create(keyframes);
370 OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > va lues = nullptr; 370 OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> valu es = nullptr;
371 effect->sample(0, 0.6, duration, values); 371 effect->sample(0, 0.6, duration, values);
372 expectDoubleValue(3.0 * 0.4 + (7.0 + 5.0) * 0.6, values->at(0)); 372 expectDoubleValue(3.0 * 0.4 + (7.0 + 5.0) * 0.6, values->at(0));
373 } 373 }
374 374
375 TEST(AnimationKeyframeEffectModel, MultipleProperties) 375 TEST(AnimationKeyframeEffectModel, MultipleProperties)
376 { 376 {
377 AnimatableValueKeyframeVector keyframes(2); 377 AnimatableValueKeyframeVector keyframes(2);
378 keyframes[0] = AnimatableValueKeyframe::create(); 378 keyframes[0] = AnimatableValueKeyframe::create();
379 keyframes[0]->setOffset(0.0); 379 keyframes[0]->setOffset(0.0);
380 keyframes[0]->setPropertyValue(CSSPropertyLeft, unknownAnimatableValue(3.0). get()); 380 keyframes[0]->setPropertyValue(CSSPropertyLeft, unknownAnimatableValue(3.0). get());
381 keyframes[0]->setPropertyValue(CSSPropertyRight, unknownAnimatableValue(4.0) .get()); 381 keyframes[0]->setPropertyValue(CSSPropertyRight, unknownAnimatableValue(4.0) .get());
382 keyframes[1] = AnimatableValueKeyframe::create(); 382 keyframes[1] = AnimatableValueKeyframe::create();
383 keyframes[1]->setOffset(1.0); 383 keyframes[1]->setOffset(1.0);
384 keyframes[1]->setPropertyValue(CSSPropertyLeft, unknownAnimatableValue(5.0). get()); 384 keyframes[1]->setPropertyValue(CSSPropertyLeft, unknownAnimatableValue(5.0). get());
385 keyframes[1]->setPropertyValue(CSSPropertyRight, unknownAnimatableValue(6.0) .get()); 385 keyframes[1]->setPropertyValue(CSSPropertyRight, unknownAnimatableValue(6.0) .get());
386 386
387 RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableVa lueKeyframeEffectModel::create(keyframes); 387 RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableVa lueKeyframeEffectModel::create(keyframes);
388 OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > va lues = nullptr; 388 OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> valu es = nullptr;
389 effect->sample(0, 0.6, duration, values); 389 effect->sample(0, 0.6, duration, values);
390 EXPECT_EQ(2UL, values->size()); 390 EXPECT_EQ(2UL, values->size());
391 Interpolation* leftValue = findValue(*values.get(), CSSPropertyLeft); 391 Interpolation* leftValue = findValue(*values.get(), CSSPropertyLeft);
392 ASSERT_TRUE(leftValue); 392 ASSERT_TRUE(leftValue);
393 expectDoubleValue(5.0, leftValue); 393 expectDoubleValue(5.0, leftValue);
394 Interpolation* rightValue = findValue(*values.get(), CSSPropertyRight); 394 Interpolation* rightValue = findValue(*values.get(), CSSPropertyRight);
395 ASSERT_TRUE(rightValue); 395 ASSERT_TRUE(rightValue);
396 expectDoubleValue(6.0, rightValue); 396 expectDoubleValue(6.0, rightValue);
397 } 397 }
398 398
399 // FIXME: Re-enable this test once compositing of CompositeAdd is supported. 399 // FIXME: Re-enable this test once compositing of CompositeAdd is supported.
400 TEST(AnimationKeyframeEffectModel, DISABLED_RecompositeCompositableValue) 400 TEST(AnimationKeyframeEffectModel, DISABLED_RecompositeCompositableValue)
401 { 401 {
402 AnimatableValueKeyframeVector keyframes = keyframesAtZeroAndOne(pixelAnimata bleValue(3.0), pixelAnimatableValue(5.0)); 402 AnimatableValueKeyframeVector keyframes = keyframesAtZeroAndOne(pixelAnimata bleValue(3.0), pixelAnimatableValue(5.0));
403 keyframes[0]->setComposite(AnimationEffect::CompositeAdd); 403 keyframes[0]->setComposite(AnimationEffect::CompositeAdd);
404 keyframes[1]->setComposite(AnimationEffect::CompositeAdd); 404 keyframes[1]->setComposite(AnimationEffect::CompositeAdd);
405 RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableVa lueKeyframeEffectModel::create(keyframes); 405 RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableVa lueKeyframeEffectModel::create(keyframes);
406 OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > va lues = nullptr; 406 OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> valu es = nullptr;
407 effect->sample(0, 0.6, duration, values); 407 effect->sample(0, 0.6, duration, values);
408 expectDoubleValue((7.0 + 3.0) * 0.4 + (7.0 + 5.0) * 0.6, values->at(0)); 408 expectDoubleValue((7.0 + 3.0) * 0.4 + (7.0 + 5.0) * 0.6, values->at(0));
409 expectDoubleValue((9.0 + 3.0) * 0.4 + (9.0 + 5.0) * 0.6, values->at(0)); 409 expectDoubleValue((9.0 + 3.0) * 0.4 + (9.0 + 5.0) * 0.6, values->at(0));
410 } 410 }
411 411
412 TEST(AnimationKeyframeEffectModel, MultipleIterations) 412 TEST(AnimationKeyframeEffectModel, MultipleIterations)
413 { 413 {
414 AnimatableValueKeyframeVector keyframes = keyframesAtZeroAndOne(pixelAnimata bleValue(1.0), pixelAnimatableValue(3.0)); 414 AnimatableValueKeyframeVector keyframes = keyframesAtZeroAndOne(pixelAnimata bleValue(1.0), pixelAnimatableValue(3.0));
415 RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableVa lueKeyframeEffectModel::create(keyframes); 415 RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableVa lueKeyframeEffectModel::create(keyframes);
416 OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > va lues = nullptr; 416 OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> valu es = nullptr;
417 effect->sample(0, 0.5, duration, values); 417 effect->sample(0, 0.5, duration, values);
418 expectDoubleValue(2.0, values->at(0)); 418 expectDoubleValue(2.0, values->at(0));
419 effect->sample(1, 0.5, duration, values); 419 effect->sample(1, 0.5, duration, values);
420 expectDoubleValue(2.0, values->at(0)); 420 expectDoubleValue(2.0, values->at(0));
421 effect->sample(2, 0.5, duration, values); 421 effect->sample(2, 0.5, duration, values);
422 expectDoubleValue(2.0, values->at(0)); 422 expectDoubleValue(2.0, values->at(0));
423 } 423 }
424 424
425 // FIXME: Re-enable this test once compositing of CompositeAdd is supported. 425 // FIXME: Re-enable this test once compositing of CompositeAdd is supported.
426 TEST(AnimationKeyframeEffectModel, DISABLED_DependsOnUnderlyingValue) 426 TEST(AnimationKeyframeEffectModel, DISABLED_DependsOnUnderlyingValue)
427 { 427 {
428 AnimatableValueKeyframeVector keyframes(3); 428 AnimatableValueKeyframeVector keyframes(3);
429 keyframes[0] = AnimatableValueKeyframe::create(); 429 keyframes[0] = AnimatableValueKeyframe::create();
430 keyframes[0]->setOffset(0.0); 430 keyframes[0]->setOffset(0.0);
431 keyframes[0]->setPropertyValue(CSSPropertyLeft, pixelAnimatableValue(1.0).ge t()); 431 keyframes[0]->setPropertyValue(CSSPropertyLeft, pixelAnimatableValue(1.0).ge t());
432 keyframes[0]->setComposite(AnimationEffect::CompositeAdd); 432 keyframes[0]->setComposite(AnimationEffect::CompositeAdd);
433 keyframes[1] = AnimatableValueKeyframe::create(); 433 keyframes[1] = AnimatableValueKeyframe::create();
434 keyframes[1]->setOffset(0.5); 434 keyframes[1]->setOffset(0.5);
435 keyframes[1]->setPropertyValue(CSSPropertyLeft, pixelAnimatableValue(1.0).ge t()); 435 keyframes[1]->setPropertyValue(CSSPropertyLeft, pixelAnimatableValue(1.0).ge t());
436 keyframes[2] = AnimatableValueKeyframe::create(); 436 keyframes[2] = AnimatableValueKeyframe::create();
437 keyframes[2]->setOffset(1.0); 437 keyframes[2]->setOffset(1.0);
438 keyframes[2]->setPropertyValue(CSSPropertyLeft, pixelAnimatableValue(1.0).ge t()); 438 keyframes[2]->setPropertyValue(CSSPropertyLeft, pixelAnimatableValue(1.0).ge t());
439 439
440 RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableVa lueKeyframeEffectModel::create(keyframes); 440 RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableVa lueKeyframeEffectModel::create(keyframes);
441 OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > va lues = nullptr; 441 OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> valu es = nullptr;
442 effect->sample(0, 0, duration, values); 442 effect->sample(0, 0, duration, values);
443 EXPECT_TRUE(values->at(0)); 443 EXPECT_TRUE(values->at(0));
444 effect->sample(0, 0.1, duration, values); 444 effect->sample(0, 0.1, duration, values);
445 EXPECT_TRUE(values->at(0)); 445 EXPECT_TRUE(values->at(0));
446 effect->sample(0, 0.25, duration, values); 446 effect->sample(0, 0.25, duration, values);
447 EXPECT_TRUE(values->at(0)); 447 EXPECT_TRUE(values->at(0));
448 effect->sample(0, 0.4, duration, values); 448 effect->sample(0, 0.4, duration, values);
449 EXPECT_TRUE(values->at(0)); 449 EXPECT_TRUE(values->at(0));
450 effect->sample(0, 0.5, duration, values); 450 effect->sample(0, 0.5, duration, values);
451 EXPECT_FALSE(values->at(0)); 451 EXPECT_FALSE(values->at(0));
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
565 EXPECT_DOUBLE_EQ(0.6, result[5]->offset()); 565 EXPECT_DOUBLE_EQ(0.6, result[5]->offset());
566 EXPECT_DOUBLE_EQ(0.7, result[6]->offset()); 566 EXPECT_DOUBLE_EQ(0.7, result[6]->offset());
567 EXPECT_DOUBLE_EQ(0.8, result[7]->offset()); 567 EXPECT_DOUBLE_EQ(0.8, result[7]->offset());
568 EXPECT_DOUBLE_EQ(0.85, result[8]->offset()); 568 EXPECT_DOUBLE_EQ(0.85, result[8]->offset());
569 EXPECT_DOUBLE_EQ(0.9, result[9]->offset()); 569 EXPECT_DOUBLE_EQ(0.9, result[9]->offset());
570 EXPECT_DOUBLE_EQ(0.95, result[10]->offset()); 570 EXPECT_DOUBLE_EQ(0.95, result[10]->offset());
571 EXPECT_DOUBLE_EQ(1.0, result[11]->offset()); 571 EXPECT_DOUBLE_EQ(1.0, result[11]->offset());
572 } 572 }
573 573
574 } // namespace blink 574 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/animation/InterpolationEffectTest.cpp ('k') | Source/core/animation/SampledEffect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698