Lines Matching refs:delegate

22 // Check that the transformation element progresses the delegate as expected and
25 TestLayerAnimationDelegate delegate;
40 delegate.SetTransformFromAnimation(start_transform);
41 element->Start(&delegate, 1);
42 element->Progress(start_time, &delegate);
44 delegate.GetTransformForAnimation());
47 element->Progress(effective_start_time, &delegate);
49 element->Progress(effective_start_time + delta/2, &delegate);
57 element->Progress(effective_start_time + delta, &delegate);
60 delegate.GetTransformForAnimation());
63 LayerAnimationElement::TargetValue target_value(&delegate);
68 // Check that the bounds element progresses the delegate as expected and
71 TestLayerAnimationDelegate delegate;
85 delegate.SetBoundsFromAnimation(start);
86 element->Start(&delegate, 1);
87 element->Progress(start_time, &delegate);
88 CheckApproximatelyEqual(start, delegate.GetBoundsForAnimation());
89 element->Progress(start_time + delta/2, &delegate);
90 CheckApproximatelyEqual(middle, delegate.GetBoundsForAnimation());
96 element->Progress(start_time + delta, &delegate);
97 CheckApproximatelyEqual(target, delegate.GetBoundsForAnimation());
100 LayerAnimationElement::TargetValue target_value(&delegate);
105 // Check that the opacity element progresses the delegate as expected and
108 TestLayerAnimationDelegate delegate;
121 delegate.SetOpacityFromAnimation(start);
122 element->Start(&delegate, 1);
123 element->Progress(start_time, &delegate);
127 element->Progress(effective_start_time, &delegate);
129 element->Progress(effective_start_time + delta/2, &delegate);
137 element->Progress(effective_start_time + delta, &delegate);
139 EXPECT_FLOAT_EQ(target, delegate.GetOpacityForAnimation());
142 LayerAnimationElement::TargetValue target_value(&delegate);
147 // Check that the visibility element progresses the delegate as expected and
150 TestLayerAnimationDelegate delegate;
161 delegate.SetVisibilityFromAnimation(start);
162 element->Start(&delegate, 1);
163 element->Progress(start_time, &delegate);
164 EXPECT_TRUE(delegate.GetVisibilityForAnimation());
165 element->Progress(start_time + delta/2, &delegate);
166 EXPECT_TRUE(delegate.GetVisibilityForAnimation());
172 element->Progress(start_time + delta, &delegate);
173 EXPECT_FALSE(delegate.GetVisibilityForAnimation());
176 LayerAnimationElement::TargetValue target_value(&delegate);
181 // Check that the Brightness element progresses the delegate as expected and
184 TestLayerAnimationDelegate delegate;
196 delegate.SetBrightnessFromAnimation(start);
197 element->Start(&delegate, 1);
198 element->Progress(start_time, &delegate);
199 EXPECT_FLOAT_EQ(start, delegate.GetBrightnessForAnimation());
200 element->Progress(start_time + delta/2, &delegate);
201 EXPECT_FLOAT_EQ(middle, delegate.GetBrightnessForAnimation());
207 element->Progress(start_time + delta, &delegate);
208 EXPECT_FLOAT_EQ(target, delegate.GetBrightnessForAnimation());
211 LayerAnimationElement::TargetValue target_value(&delegate);
216 // Check that the Grayscale element progresses the delegate as expected and
219 TestLayerAnimationDelegate delegate;
231 delegate.SetGrayscaleFromAnimation(start);
232 element->Start(&delegate, 1);
233 element->Progress(start_time, &delegate);
234 EXPECT_FLOAT_EQ(start, delegate.GetGrayscaleForAnimation());
235 element->Progress(start_time + delta/2, &delegate);
236 EXPECT_FLOAT_EQ(middle, delegate.GetGrayscaleForAnimation());
242 element->Progress(start_time + delta, &delegate);
243 EXPECT_FLOAT_EQ(target, delegate.GetGrayscaleForAnimation());
246 LayerAnimationElement::TargetValue target_value(&delegate);
251 // Check that the pause element progresses the delegate as expected and
266 TestLayerAnimationDelegate delegate;
267 TestLayerAnimationDelegate copy = delegate;
271 element->Start(&delegate, 1);
278 element->Progress(start_time + delta, &delegate);
281 CheckApproximatelyEqual(delegate.GetBoundsForAnimation(),
283 CheckApproximatelyEqual(delegate.GetTransformForAnimation(),
285 EXPECT_FLOAT_EQ(delegate.GetOpacityForAnimation(),
287 EXPECT_FLOAT_EQ(delegate.GetBrightnessForAnimation(),
289 EXPECT_FLOAT_EQ(delegate.GetGrayscaleForAnimation(),
293 // Check that a threaded opacity element updates the delegate as expected when
296 TestLayerAnimationDelegate delegate;
309 delegate.SetOpacityFromAnimation(start);
311 // Aborting the element before it has started should not update the delegate.
312 element->Abort(&delegate);
313 EXPECT_FLOAT_EQ(start, delegate.GetOpacityForAnimation());
317 element->Start(&delegate, 1);
318 element->Progress(start_time, &delegate);
321 element->Progress(effective_start_time, &delegate);
322 element->Progress(effective_start_time + delta/2, &delegate);
324 // Since the element has started, it should update the delegate when
326 element->Abort(&delegate);
328 delegate.GetOpacityForAnimation());
331 // Check that a threaded transform element updates the delegate as expected when
334 TestLayerAnimationDelegate delegate;
348 delegate.SetTransformFromAnimation(start_transform);
350 // Aborting the element before it has started should not update the delegate.
351 element->Abort(&delegate);
352 CheckApproximatelyEqual(start_transform, delegate.GetTransformForAnimation());
356 element->Start(&delegate, 1);
357 element->Progress(start_time, &delegate);
360 element->Progress(effective_start_time, &delegate);
361 element->Progress(effective_start_time + delta/2, &delegate);
363 // Since the element has started, it should update the delegate when
365 element->Abort(&delegate);
369 delegate.GetTransformForAnimation());