| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ui/compositor/layer_animator.h" | 5 #include "ui/compositor/layer_animator.h" |
| 6 | 6 |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| (...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 EXPECT_TRUE(test_controller.animator()->is_animating()); | 368 EXPECT_TRUE(test_controller.animator()->is_animating()); |
| 369 EXPECT_FLOAT_EQ(delegate.GetOpacityForAnimation(), start_opacity); | 369 EXPECT_FLOAT_EQ(delegate.GetOpacityForAnimation(), start_opacity); |
| 370 | 370 |
| 371 base::TimeTicks start_time = test_controller.animator()->last_step_time(); | 371 base::TimeTicks start_time = test_controller.animator()->last_step_time(); |
| 372 base::TimeTicks effective_start = start_time + delta; | 372 base::TimeTicks effective_start = start_time + delta; |
| 373 | 373 |
| 374 test_controller.animator()->OnThreadedAnimationStarted(cc::AnimationEvent( | 374 test_controller.animator()->OnThreadedAnimationStarted(cc::AnimationEvent( |
| 375 cc::AnimationEvent::STARTED, 0, | 375 cc::AnimationEvent::STARTED, 0, |
| 376 test_controller.GetRunningSequence(LayerAnimationElement::OPACITY) | 376 test_controller.GetRunningSequence(LayerAnimationElement::OPACITY) |
| 377 ->animation_group_id(), | 377 ->animation_group_id(), |
| 378 cc::Animation::OPACITY, effective_start)); | 378 cc::TargetProperty::OPACITY, effective_start)); |
| 379 | 379 |
| 380 animator->Step(effective_start + delta / 2); | 380 animator->Step(effective_start + delta / 2); |
| 381 | 381 |
| 382 EXPECT_TRUE(test_controller.animator()->is_animating()); | 382 EXPECT_TRUE(test_controller.animator()->is_animating()); |
| 383 EXPECT_NEAR( | 383 EXPECT_NEAR( |
| 384 0.5, | 384 0.5, |
| 385 test_controller.GetRunningSequence(LayerAnimationElement::OPACITY)-> | 385 test_controller.GetRunningSequence(LayerAnimationElement::OPACITY)-> |
| 386 last_progressed_fraction(), | 386 last_progressed_fraction(), |
| 387 epsilon); | 387 epsilon); |
| 388 | 388 |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 477 EXPECT_FLOAT_EQ(delegate.GetOpacityForAnimation(), start_opacity); | 477 EXPECT_FLOAT_EQ(delegate.GetOpacityForAnimation(), start_opacity); |
| 478 CheckApproximatelyEqual(delegate.GetBoundsForAnimation(), start_bounds); | 478 CheckApproximatelyEqual(delegate.GetBoundsForAnimation(), start_bounds); |
| 479 | 479 |
| 480 base::TimeTicks start_time = test_controller.animator()->last_step_time(); | 480 base::TimeTicks start_time = test_controller.animator()->last_step_time(); |
| 481 base::TimeTicks effective_start = start_time + delta; | 481 base::TimeTicks effective_start = start_time + delta; |
| 482 | 482 |
| 483 test_controller.animator()->OnThreadedAnimationStarted(cc::AnimationEvent( | 483 test_controller.animator()->OnThreadedAnimationStarted(cc::AnimationEvent( |
| 484 cc::AnimationEvent::STARTED, 0, | 484 cc::AnimationEvent::STARTED, 0, |
| 485 test_controller.GetRunningSequence(LayerAnimationElement::OPACITY) | 485 test_controller.GetRunningSequence(LayerAnimationElement::OPACITY) |
| 486 ->animation_group_id(), | 486 ->animation_group_id(), |
| 487 cc::Animation::OPACITY, effective_start)); | 487 cc::TargetProperty::OPACITY, effective_start)); |
| 488 | 488 |
| 489 animator->Step(effective_start + delta / 2); | 489 animator->Step(effective_start + delta / 2); |
| 490 | 490 |
| 491 EXPECT_TRUE(test_controller.animator()->is_animating()); | 491 EXPECT_TRUE(test_controller.animator()->is_animating()); |
| 492 EXPECT_NEAR( | 492 EXPECT_NEAR( |
| 493 0.5, | 493 0.5, |
| 494 test_controller.GetRunningSequence(LayerAnimationElement::OPACITY)-> | 494 test_controller.GetRunningSequence(LayerAnimationElement::OPACITY)-> |
| 495 last_progressed_fraction(), | 495 last_progressed_fraction(), |
| 496 epsilon); | 496 epsilon); |
| 497 CheckApproximatelyEqual(delegate.GetBoundsForAnimation(), middle_bounds); | 497 CheckApproximatelyEqual(delegate.GetBoundsForAnimation(), middle_bounds); |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 739 EXPECT_TRUE(test_controller.animator()->is_animating()); | 739 EXPECT_TRUE(test_controller.animator()->is_animating()); |
| 740 EXPECT_FLOAT_EQ(delegate.GetOpacityForAnimation(), start_opacity); | 740 EXPECT_FLOAT_EQ(delegate.GetOpacityForAnimation(), start_opacity); |
| 741 | 741 |
| 742 base::TimeTicks start_time = test_controller.animator()->last_step_time(); | 742 base::TimeTicks start_time = test_controller.animator()->last_step_time(); |
| 743 base::TimeTicks effective_start = start_time + delta; | 743 base::TimeTicks effective_start = start_time + delta; |
| 744 | 744 |
| 745 test_controller.animator()->OnThreadedAnimationStarted(cc::AnimationEvent( | 745 test_controller.animator()->OnThreadedAnimationStarted(cc::AnimationEvent( |
| 746 cc::AnimationEvent::STARTED, 0, | 746 cc::AnimationEvent::STARTED, 0, |
| 747 test_controller.GetRunningSequence(LayerAnimationElement::OPACITY) | 747 test_controller.GetRunningSequence(LayerAnimationElement::OPACITY) |
| 748 ->animation_group_id(), | 748 ->animation_group_id(), |
| 749 cc::Animation::OPACITY, effective_start)); | 749 cc::TargetProperty::OPACITY, effective_start)); |
| 750 | 750 |
| 751 animator->Step(effective_start + delta / 2); | 751 animator->Step(effective_start + delta / 2); |
| 752 | 752 |
| 753 EXPECT_TRUE(test_controller.animator()->is_animating()); | 753 EXPECT_TRUE(test_controller.animator()->is_animating()); |
| 754 EXPECT_NEAR( | 754 EXPECT_NEAR( |
| 755 0.5, | 755 0.5, |
| 756 test_controller.GetRunningSequence(LayerAnimationElement::OPACITY)-> | 756 test_controller.GetRunningSequence(LayerAnimationElement::OPACITY)-> |
| 757 last_progressed_fraction(), | 757 last_progressed_fraction(), |
| 758 epsilon); | 758 epsilon); |
| 759 | 759 |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 863 new LayerAnimationSequence( | 863 new LayerAnimationSequence( |
| 864 LayerAnimationElement::CreateOpacityElement(target_opacity, delta))); | 864 LayerAnimationElement::CreateOpacityElement(target_opacity, delta))); |
| 865 | 865 |
| 866 base::TimeTicks start_time = test_controller.animator()->last_step_time(); | 866 base::TimeTicks start_time = test_controller.animator()->last_step_time(); |
| 867 base::TimeTicks effective_start = start_time + delta; | 867 base::TimeTicks effective_start = start_time + delta; |
| 868 | 868 |
| 869 test_controller.animator()->OnThreadedAnimationStarted(cc::AnimationEvent( | 869 test_controller.animator()->OnThreadedAnimationStarted(cc::AnimationEvent( |
| 870 cc::AnimationEvent::STARTED, 0, | 870 cc::AnimationEvent::STARTED, 0, |
| 871 test_controller.GetRunningSequence(LayerAnimationElement::OPACITY) | 871 test_controller.GetRunningSequence(LayerAnimationElement::OPACITY) |
| 872 ->animation_group_id(), | 872 ->animation_group_id(), |
| 873 cc::Animation::OPACITY, effective_start)); | 873 cc::TargetProperty::OPACITY, effective_start)); |
| 874 | 874 |
| 875 animator->Step(effective_start + delta / 2); | 875 animator->Step(effective_start + delta / 2); |
| 876 | 876 |
| 877 test_controller.animator()->StartAnimation( | 877 test_controller.animator()->StartAnimation( |
| 878 new LayerAnimationSequence( | 878 new LayerAnimationSequence( |
| 879 LayerAnimationElement::CreateOpacityElement(start_opacity, delta))); | 879 LayerAnimationElement::CreateOpacityElement(start_opacity, delta))); |
| 880 | 880 |
| 881 EXPECT_TRUE(test_controller.animator()->is_animating()); | 881 EXPECT_TRUE(test_controller.animator()->is_animating()); |
| 882 EXPECT_NEAR(delegate.GetOpacityForAnimation(), middle_opacity, epsilon); | 882 EXPECT_NEAR(delegate.GetOpacityForAnimation(), middle_opacity, epsilon); |
| 883 | 883 |
| 884 test_controller.animator()->StartAnimation( | 884 test_controller.animator()->StartAnimation( |
| 885 new LayerAnimationSequence( | 885 new LayerAnimationSequence( |
| 886 LayerAnimationElement::CreateOpacityElement(start_opacity, delta))); | 886 LayerAnimationElement::CreateOpacityElement(start_opacity, delta))); |
| 887 | 887 |
| 888 EXPECT_TRUE(test_controller.animator()->is_animating()); | 888 EXPECT_TRUE(test_controller.animator()->is_animating()); |
| 889 | 889 |
| 890 base::TimeTicks second_effective_start = effective_start + delta; | 890 base::TimeTicks second_effective_start = effective_start + delta; |
| 891 | 891 |
| 892 test_controller.animator()->OnThreadedAnimationStarted(cc::AnimationEvent( | 892 test_controller.animator()->OnThreadedAnimationStarted(cc::AnimationEvent( |
| 893 cc::AnimationEvent::STARTED, 0, | 893 cc::AnimationEvent::STARTED, 0, |
| 894 test_controller.GetRunningSequence(LayerAnimationElement::OPACITY) | 894 test_controller.GetRunningSequence(LayerAnimationElement::OPACITY) |
| 895 ->animation_group_id(), | 895 ->animation_group_id(), |
| 896 cc::Animation::OPACITY, second_effective_start)); | 896 cc::TargetProperty::OPACITY, second_effective_start)); |
| 897 | 897 |
| 898 animator->Step(second_effective_start + delta / 2); | 898 animator->Step(second_effective_start + delta / 2); |
| 899 | 899 |
| 900 EXPECT_TRUE(test_controller.animator()->is_animating()); | 900 EXPECT_TRUE(test_controller.animator()->is_animating()); |
| 901 EXPECT_NEAR( | 901 EXPECT_NEAR( |
| 902 0.5, | 902 0.5, |
| 903 test_controller.GetRunningSequence(LayerAnimationElement::OPACITY)-> | 903 test_controller.GetRunningSequence(LayerAnimationElement::OPACITY)-> |
| 904 last_progressed_fraction(), | 904 last_progressed_fraction(), |
| 905 epsilon); | 905 epsilon); |
| 906 | 906 |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1186 delta) | 1186 delta) |
| 1187 )); | 1187 )); |
| 1188 | 1188 |
| 1189 base::TimeTicks start_time = test_controller.animator()->last_step_time(); | 1189 base::TimeTicks start_time = test_controller.animator()->last_step_time(); |
| 1190 base::TimeTicks effective_start = start_time + delta; | 1190 base::TimeTicks effective_start = start_time + delta; |
| 1191 | 1191 |
| 1192 test_controller.animator()->OnThreadedAnimationStarted(cc::AnimationEvent( | 1192 test_controller.animator()->OnThreadedAnimationStarted(cc::AnimationEvent( |
| 1193 cc::AnimationEvent::STARTED, 0, | 1193 cc::AnimationEvent::STARTED, 0, |
| 1194 test_controller.GetRunningSequence(LayerAnimationElement::OPACITY) | 1194 test_controller.GetRunningSequence(LayerAnimationElement::OPACITY) |
| 1195 ->animation_group_id(), | 1195 ->animation_group_id(), |
| 1196 cc::Animation::OPACITY, effective_start)); | 1196 cc::TargetProperty::OPACITY, effective_start)); |
| 1197 | 1197 |
| 1198 animator->Step(effective_start + delta / 2); | 1198 animator->Step(effective_start + delta / 2); |
| 1199 | 1199 |
| 1200 test_controller.animator()->StartTogether( | 1200 test_controller.animator()->StartTogether( |
| 1201 CreateMultiSequence( | 1201 CreateMultiSequence( |
| 1202 LayerAnimationElement::CreateOpacityElement(start_opacity, delta), | 1202 LayerAnimationElement::CreateOpacityElement(start_opacity, delta), |
| 1203 LayerAnimationElement::CreateBrightnessElement(start_brightness, | 1203 LayerAnimationElement::CreateBrightnessElement(start_brightness, |
| 1204 delta))); | 1204 delta))); |
| 1205 | 1205 |
| 1206 EXPECT_TRUE(test_controller.animator()->is_animating()); | 1206 EXPECT_TRUE(test_controller.animator()->is_animating()); |
| 1207 EXPECT_NEAR(delegate.GetOpacityForAnimation(), middle_opacity, epsilon); | 1207 EXPECT_NEAR(delegate.GetOpacityForAnimation(), middle_opacity, epsilon); |
| 1208 EXPECT_NEAR(delegate.GetBrightnessForAnimation(), middle_brightness, epsilon); | 1208 EXPECT_NEAR(delegate.GetBrightnessForAnimation(), middle_brightness, epsilon); |
| 1209 | 1209 |
| 1210 test_controller.animator()->StartTogether( | 1210 test_controller.animator()->StartTogether( |
| 1211 CreateMultiSequence( | 1211 CreateMultiSequence( |
| 1212 LayerAnimationElement::CreateOpacityElement(start_opacity, delta), | 1212 LayerAnimationElement::CreateOpacityElement(start_opacity, delta), |
| 1213 LayerAnimationElement::CreateBrightnessElement(start_brightness, | 1213 LayerAnimationElement::CreateBrightnessElement(start_brightness, |
| 1214 delta))); | 1214 delta))); |
| 1215 | 1215 |
| 1216 EXPECT_TRUE(test_controller.animator()->is_animating()); | 1216 EXPECT_TRUE(test_controller.animator()->is_animating()); |
| 1217 | 1217 |
| 1218 base::TimeTicks second_effective_start = effective_start + delta; | 1218 base::TimeTicks second_effective_start = effective_start + delta; |
| 1219 | 1219 |
| 1220 test_controller.animator()->OnThreadedAnimationStarted(cc::AnimationEvent( | 1220 test_controller.animator()->OnThreadedAnimationStarted(cc::AnimationEvent( |
| 1221 cc::AnimationEvent::STARTED, 0, | 1221 cc::AnimationEvent::STARTED, 0, |
| 1222 test_controller.GetRunningSequence(LayerAnimationElement::OPACITY) | 1222 test_controller.GetRunningSequence(LayerAnimationElement::OPACITY) |
| 1223 ->animation_group_id(), | 1223 ->animation_group_id(), |
| 1224 cc::Animation::OPACITY, second_effective_start)); | 1224 cc::TargetProperty::OPACITY, second_effective_start)); |
| 1225 | 1225 |
| 1226 animator->Step(second_effective_start + delta / 2); | 1226 animator->Step(second_effective_start + delta / 2); |
| 1227 | 1227 |
| 1228 EXPECT_TRUE(test_controller.animator()->is_animating()); | 1228 EXPECT_TRUE(test_controller.animator()->is_animating()); |
| 1229 EXPECT_NEAR( | 1229 EXPECT_NEAR( |
| 1230 0.5, | 1230 0.5, |
| 1231 test_controller.GetRunningSequence(LayerAnimationElement::OPACITY)-> | 1231 test_controller.GetRunningSequence(LayerAnimationElement::OPACITY)-> |
| 1232 last_progressed_fraction(), | 1232 last_progressed_fraction(), |
| 1233 epsilon); | 1233 epsilon); |
| 1234 EXPECT_NEAR(delegate.GetBrightnessForAnimation(), | 1234 EXPECT_NEAR(delegate.GetBrightnessForAnimation(), |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1458 | 1458 |
| 1459 test_controller.animator()->StartAnimation(sequence.release()); | 1459 test_controller.animator()->StartAnimation(sequence.release()); |
| 1460 | 1460 |
| 1461 base::TimeTicks start_time = test_controller.animator()->last_step_time(); | 1461 base::TimeTicks start_time = test_controller.animator()->last_step_time(); |
| 1462 base::TimeTicks effective_start = start_time + delta; | 1462 base::TimeTicks effective_start = start_time + delta; |
| 1463 | 1463 |
| 1464 test_controller.animator()->OnThreadedAnimationStarted(cc::AnimationEvent( | 1464 test_controller.animator()->OnThreadedAnimationStarted(cc::AnimationEvent( |
| 1465 cc::AnimationEvent::STARTED, 0, | 1465 cc::AnimationEvent::STARTED, 0, |
| 1466 test_controller.GetRunningSequence(LayerAnimationElement::OPACITY) | 1466 test_controller.GetRunningSequence(LayerAnimationElement::OPACITY) |
| 1467 ->animation_group_id(), | 1467 ->animation_group_id(), |
| 1468 cc::Animation::OPACITY, effective_start)); | 1468 cc::TargetProperty::OPACITY, effective_start)); |
| 1469 | 1469 |
| 1470 animator->Step(effective_start + delta); | 1470 animator->Step(effective_start + delta); |
| 1471 EXPECT_TRUE(test_controller.animator()->is_animating()); | 1471 EXPECT_TRUE(test_controller.animator()->is_animating()); |
| 1472 EXPECT_FLOAT_EQ(delegate.GetOpacityForAnimation(), target_opacity); | 1472 EXPECT_FLOAT_EQ(delegate.GetOpacityForAnimation(), target_opacity); |
| 1473 | 1473 |
| 1474 base::TimeTicks second_effective_start = effective_start + 2 * delta; | 1474 base::TimeTicks second_effective_start = effective_start + 2 * delta; |
| 1475 test_controller.animator()->OnThreadedAnimationStarted(cc::AnimationEvent( | 1475 test_controller.animator()->OnThreadedAnimationStarted(cc::AnimationEvent( |
| 1476 cc::AnimationEvent::STARTED, 0, | 1476 cc::AnimationEvent::STARTED, 0, |
| 1477 test_controller.GetRunningSequence(LayerAnimationElement::OPACITY) | 1477 test_controller.GetRunningSequence(LayerAnimationElement::OPACITY) |
| 1478 ->animation_group_id(), | 1478 ->animation_group_id(), |
| 1479 cc::Animation::OPACITY, second_effective_start)); | 1479 cc::TargetProperty::OPACITY, second_effective_start)); |
| 1480 | 1480 |
| 1481 animator->Step(second_effective_start + delta); | 1481 animator->Step(second_effective_start + delta); |
| 1482 | 1482 |
| 1483 EXPECT_TRUE(test_controller.animator()->is_animating()); | 1483 EXPECT_TRUE(test_controller.animator()->is_animating()); |
| 1484 EXPECT_FLOAT_EQ(delegate.GetOpacityForAnimation(), start_opacity); | 1484 EXPECT_FLOAT_EQ(delegate.GetOpacityForAnimation(), start_opacity); |
| 1485 | 1485 |
| 1486 base::TimeTicks third_effective_start = second_effective_start + 2 * delta; | 1486 base::TimeTicks third_effective_start = second_effective_start + 2 * delta; |
| 1487 test_controller.animator()->OnThreadedAnimationStarted(cc::AnimationEvent( | 1487 test_controller.animator()->OnThreadedAnimationStarted(cc::AnimationEvent( |
| 1488 cc::AnimationEvent::STARTED, 0, | 1488 cc::AnimationEvent::STARTED, 0, |
| 1489 test_controller.GetRunningSequence(LayerAnimationElement::OPACITY) | 1489 test_controller.GetRunningSequence(LayerAnimationElement::OPACITY) |
| 1490 ->animation_group_id(), | 1490 ->animation_group_id(), |
| 1491 cc::Animation::OPACITY, third_effective_start)); | 1491 cc::TargetProperty::OPACITY, third_effective_start)); |
| 1492 | 1492 |
| 1493 animator->Step(third_effective_start + delta); | 1493 animator->Step(third_effective_start + delta); |
| 1494 EXPECT_TRUE(test_controller.animator()->is_animating()); | 1494 EXPECT_TRUE(test_controller.animator()->is_animating()); |
| 1495 EXPECT_FLOAT_EQ(delegate.GetOpacityForAnimation(), target_opacity); | 1495 EXPECT_FLOAT_EQ(delegate.GetOpacityForAnimation(), target_opacity); |
| 1496 | 1496 |
| 1497 base::TimeTicks fourth_effective_start = third_effective_start + 2 * delta; | 1497 base::TimeTicks fourth_effective_start = third_effective_start + 2 * delta; |
| 1498 test_controller.animator()->OnThreadedAnimationStarted(cc::AnimationEvent( | 1498 test_controller.animator()->OnThreadedAnimationStarted(cc::AnimationEvent( |
| 1499 cc::AnimationEvent::STARTED, 0, | 1499 cc::AnimationEvent::STARTED, 0, |
| 1500 test_controller.GetRunningSequence(LayerAnimationElement::OPACITY) | 1500 test_controller.GetRunningSequence(LayerAnimationElement::OPACITY) |
| 1501 ->animation_group_id(), | 1501 ->animation_group_id(), |
| 1502 cc::Animation::OPACITY, fourth_effective_start)); | 1502 cc::TargetProperty::OPACITY, fourth_effective_start)); |
| 1503 | 1503 |
| 1504 // Skip ahead by a lot. | 1504 // Skip ahead by a lot. |
| 1505 animator->Step(fourth_effective_start + 1000 * delta); | 1505 animator->Step(fourth_effective_start + 1000 * delta); |
| 1506 | 1506 |
| 1507 EXPECT_TRUE(test_controller.animator()->is_animating()); | 1507 EXPECT_TRUE(test_controller.animator()->is_animating()); |
| 1508 EXPECT_FLOAT_EQ(delegate.GetOpacityForAnimation(), target_opacity); | 1508 EXPECT_FLOAT_EQ(delegate.GetOpacityForAnimation(), target_opacity); |
| 1509 | 1509 |
| 1510 base::TimeTicks fifth_effective_start = fourth_effective_start + 1001 * delta; | 1510 base::TimeTicks fifth_effective_start = fourth_effective_start + 1001 * delta; |
| 1511 test_controller.animator()->OnThreadedAnimationStarted(cc::AnimationEvent( | 1511 test_controller.animator()->OnThreadedAnimationStarted(cc::AnimationEvent( |
| 1512 cc::AnimationEvent::STARTED, 0, | 1512 cc::AnimationEvent::STARTED, 0, |
| 1513 test_controller.GetRunningSequence(LayerAnimationElement::OPACITY) | 1513 test_controller.GetRunningSequence(LayerAnimationElement::OPACITY) |
| 1514 ->animation_group_id(), | 1514 ->animation_group_id(), |
| 1515 cc::Animation::OPACITY, fifth_effective_start)); | 1515 cc::TargetProperty::OPACITY, fifth_effective_start)); |
| 1516 | 1516 |
| 1517 // Skip ahead by a lot. | 1517 // Skip ahead by a lot. |
| 1518 animator->Step(fifth_effective_start + 999 * delta); | 1518 animator->Step(fifth_effective_start + 999 * delta); |
| 1519 | 1519 |
| 1520 EXPECT_TRUE(test_controller.animator()->is_animating()); | 1520 EXPECT_TRUE(test_controller.animator()->is_animating()); |
| 1521 EXPECT_FLOAT_EQ(delegate.GetOpacityForAnimation(), start_opacity); | 1521 EXPECT_FLOAT_EQ(delegate.GetOpacityForAnimation(), start_opacity); |
| 1522 | 1522 |
| 1523 test_controller.animator()->StopAnimatingProperty( | 1523 test_controller.animator()->StopAnimatingProperty( |
| 1524 LayerAnimationElement::OPACITY); | 1524 LayerAnimationElement::OPACITY); |
| 1525 | 1525 |
| (...skipping 1272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2798 EXPECT_EQ(observer.last_ended_sequence(), nullptr); | 2798 EXPECT_EQ(observer.last_ended_sequence(), nullptr); |
| 2799 EXPECT_EQ(observer.last_detached_sequence(), first_sequence); | 2799 EXPECT_EQ(observer.last_detached_sequence(), first_sequence); |
| 2800 | 2800 |
| 2801 EXPECT_TRUE(observer.AbortedEpochIsBeforeDetachedEpoch()); | 2801 EXPECT_TRUE(observer.AbortedEpochIsBeforeDetachedEpoch()); |
| 2802 EXPECT_TRUE(observer.AbortedEpochIsBeforeStartedEpoch()); | 2802 EXPECT_TRUE(observer.AbortedEpochIsBeforeStartedEpoch()); |
| 2803 EXPECT_TRUE(observer.AttachedEpochIsBeforeScheduledEpoch()); | 2803 EXPECT_TRUE(observer.AttachedEpochIsBeforeScheduledEpoch()); |
| 2804 EXPECT_TRUE(observer.ScheduledEpochIsBeforeStartedEpoch()); | 2804 EXPECT_TRUE(observer.ScheduledEpochIsBeforeStartedEpoch()); |
| 2805 } | 2805 } |
| 2806 | 2806 |
| 2807 } // namespace ui | 2807 } // namespace ui |
| OLD | NEW |