| OLD | NEW |
| 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 672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 683 .Times(1) | 683 .Times(1) |
| 684 .After(usesMockAnimation); | 684 .After(usesMockAnimation); |
| 685 EXPECT_CALL(*mockCurvePtr, delete_()) | 685 EXPECT_CALL(*mockCurvePtr, delete_()) |
| 686 .Times(1) | 686 .Times(1) |
| 687 .After(usesMockCurve); | 687 .After(usesMockCurve); |
| 688 | 688 |
| 689 // Go! | 689 // Go! |
| 690 Vector<OwnPtr<CompositorAnimation>> result; | 690 Vector<OwnPtr<CompositorAnimation>> result; |
| 691 getAnimationOnCompositor(m_timing, *effect, result); | 691 getAnimationOnCompositor(m_timing, *effect, result); |
| 692 EXPECT_EQ(1U, result.size()); | 692 EXPECT_EQ(1U, result.size()); |
| 693 result[0].clear(); | 693 result[0].reset(); |
| 694 } | 694 } |
| 695 | 695 |
| 696 TEST_F(AnimationCompositorAnimationsTest, createSimpleOpacityAnimationDuration) | 696 TEST_F(AnimationCompositorAnimationsTest, createSimpleOpacityAnimationDuration) |
| 697 { | 697 { |
| 698 // KeyframeEffect to convert | 698 // KeyframeEffect to convert |
| 699 AnimatableValueKeyframeEffectModel* effect = createKeyframeEffectModel( | 699 AnimatableValueKeyframeEffectModel* effect = createKeyframeEffectModel( |
| 700 createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(2.0
).get(), 0), | 700 createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(2.0
).get(), 0), |
| 701 createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(5.0
).get(), 1.0)); | 701 createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(5.0
).get(), 1.0)); |
| 702 | 702 |
| 703 m_timing.iterationDuration = 10.0; | 703 m_timing.iterationDuration = 10.0; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 728 .Times(1) | 728 .Times(1) |
| 729 .After(usesMockAnimation); | 729 .After(usesMockAnimation); |
| 730 EXPECT_CALL(*mockCurvePtr, delete_()) | 730 EXPECT_CALL(*mockCurvePtr, delete_()) |
| 731 .Times(1) | 731 .Times(1) |
| 732 .After(usesMockCurve); | 732 .After(usesMockCurve); |
| 733 | 733 |
| 734 // Go! | 734 // Go! |
| 735 Vector<OwnPtr<CompositorAnimation>> result; | 735 Vector<OwnPtr<CompositorAnimation>> result; |
| 736 getAnimationOnCompositor(m_timing, *effect, result); | 736 getAnimationOnCompositor(m_timing, *effect, result); |
| 737 EXPECT_EQ(1U, result.size()); | 737 EXPECT_EQ(1U, result.size()); |
| 738 result[0].clear(); | 738 result[0].reset(); |
| 739 } | 739 } |
| 740 | 740 |
| 741 TEST_F(AnimationCompositorAnimationsTest, createMultipleKeyframeOpacityAnimation
Linear) | 741 TEST_F(AnimationCompositorAnimationsTest, createMultipleKeyframeOpacityAnimation
Linear) |
| 742 { | 742 { |
| 743 // KeyframeEffect to convert | 743 // KeyframeEffect to convert |
| 744 AnimatableValueKeyframeEffectModel* effect = createKeyframeEffectModel( | 744 AnimatableValueKeyframeEffectModel* effect = createKeyframeEffectModel( |
| 745 createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(2.0
).get(), 0), | 745 createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(2.0
).get(), 0), |
| 746 createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(-1.
0).get(), 0.25), | 746 createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(-1.
0).get(), 0.25), |
| 747 createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(20.
0).get(), 0.5), | 747 createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(20.
0).get(), 0.5), |
| 748 createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(5.0
).get(), 1.0)); | 748 createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(5.0
).get(), 1.0)); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 780 .Times(1) | 780 .Times(1) |
| 781 .After(usesMockAnimation); | 781 .After(usesMockAnimation); |
| 782 EXPECT_CALL(*mockCurvePtr, delete_()) | 782 EXPECT_CALL(*mockCurvePtr, delete_()) |
| 783 .Times(1) | 783 .Times(1) |
| 784 .After(usesMockCurve); | 784 .After(usesMockCurve); |
| 785 | 785 |
| 786 // Go! | 786 // Go! |
| 787 Vector<OwnPtr<CompositorAnimation>> result; | 787 Vector<OwnPtr<CompositorAnimation>> result; |
| 788 getAnimationOnCompositor(m_timing, *effect, result); | 788 getAnimationOnCompositor(m_timing, *effect, result); |
| 789 EXPECT_EQ(1U, result.size()); | 789 EXPECT_EQ(1U, result.size()); |
| 790 result[0].clear(); | 790 result[0].reset(); |
| 791 } | 791 } |
| 792 | 792 |
| 793 TEST_F(AnimationCompositorAnimationsTest, createSimpleOpacityAnimationStartDelay
) | 793 TEST_F(AnimationCompositorAnimationsTest, createSimpleOpacityAnimationStartDelay
) |
| 794 { | 794 { |
| 795 // KeyframeEffect to convert | 795 // KeyframeEffect to convert |
| 796 AnimatableValueKeyframeEffectModel* effect = createKeyframeEffectModel( | 796 AnimatableValueKeyframeEffectModel* effect = createKeyframeEffectModel( |
| 797 createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(2.0
).get(), 0), | 797 createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(2.0
).get(), 0), |
| 798 createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(5.0
).get(), 1.0)); | 798 createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(5.0
).get(), 1.0)); |
| 799 | 799 |
| 800 m_timing.iterationCount = 5.0; | 800 m_timing.iterationCount = 5.0; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 827 .Times(1) | 827 .Times(1) |
| 828 .After(usesMockAnimation); | 828 .After(usesMockAnimation); |
| 829 EXPECT_CALL(*mockCurvePtr, delete_()) | 829 EXPECT_CALL(*mockCurvePtr, delete_()) |
| 830 .Times(1) | 830 .Times(1) |
| 831 .After(usesMockCurve); | 831 .After(usesMockCurve); |
| 832 | 832 |
| 833 // Go! | 833 // Go! |
| 834 Vector<OwnPtr<CompositorAnimation>> result; | 834 Vector<OwnPtr<CompositorAnimation>> result; |
| 835 getAnimationOnCompositor(m_timing, *effect, result); | 835 getAnimationOnCompositor(m_timing, *effect, result); |
| 836 EXPECT_EQ(1U, result.size()); | 836 EXPECT_EQ(1U, result.size()); |
| 837 result[0].clear(); | 837 result[0].reset(); |
| 838 } | 838 } |
| 839 | 839 |
| 840 TEST_F(AnimationCompositorAnimationsTest, createMultipleKeyframeOpacityAnimation
Chained) | 840 TEST_F(AnimationCompositorAnimationsTest, createMultipleKeyframeOpacityAnimation
Chained) |
| 841 { | 841 { |
| 842 // KeyframeEffect to convert | 842 // KeyframeEffect to convert |
| 843 AnimatableValueKeyframeVector frames; | 843 AnimatableValueKeyframeVector frames; |
| 844 frames.append(createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::
create(2.0).get(), 0)); | 844 frames.append(createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::
create(2.0).get(), 0)); |
| 845 frames.append(createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::
create(-1.0).get(), 0.25)); | 845 frames.append(createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::
create(-1.0).get(), 0.25)); |
| 846 frames.append(createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::
create(20.0).get(), 0.5)); | 846 frames.append(createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::
create(20.0).get(), 0.5)); |
| 847 frames.append(createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::
create(5.0).get(), 1.0)); | 847 frames.append(createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::
create(5.0).get(), 1.0)); |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 884 .Times(1) | 884 .Times(1) |
| 885 .After(usesMockAnimation); | 885 .After(usesMockAnimation); |
| 886 EXPECT_CALL(*mockCurvePtr, delete_()) | 886 EXPECT_CALL(*mockCurvePtr, delete_()) |
| 887 .Times(1) | 887 .Times(1) |
| 888 .After(usesMockCurve); | 888 .After(usesMockCurve); |
| 889 | 889 |
| 890 // Go! | 890 // Go! |
| 891 Vector<OwnPtr<CompositorAnimation>> result; | 891 Vector<OwnPtr<CompositorAnimation>> result; |
| 892 getAnimationOnCompositor(m_timing, *effect, result); | 892 getAnimationOnCompositor(m_timing, *effect, result); |
| 893 EXPECT_EQ(1U, result.size()); | 893 EXPECT_EQ(1U, result.size()); |
| 894 result[0].clear(); | 894 result[0].reset(); |
| 895 } | 895 } |
| 896 | 896 |
| 897 TEST_F(AnimationCompositorAnimationsTest, createReversedOpacityAnimation) | 897 TEST_F(AnimationCompositorAnimationsTest, createReversedOpacityAnimation) |
| 898 { | 898 { |
| 899 RefPtr<TimingFunction> cubicEasyFlipTimingFunction = CubicBezierTimingFuncti
on::create(0.0, 0.0, 0.0, 1.0); | 899 RefPtr<TimingFunction> cubicEasyFlipTimingFunction = CubicBezierTimingFuncti
on::create(0.0, 0.0, 0.0, 1.0); |
| 900 | 900 |
| 901 // KeyframeEffect to convert | 901 // KeyframeEffect to convert |
| 902 AnimatableValueKeyframeVector frames; | 902 AnimatableValueKeyframeVector frames; |
| 903 frames.append(createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::
create(2.0).get(), 0)); | 903 frames.append(createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::
create(2.0).get(), 0)); |
| 904 frames.append(createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::
create(-1.0).get(), 0.25)); | 904 frames.append(createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::
create(-1.0).get(), 0.25)); |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 942 .Times(1) | 942 .Times(1) |
| 943 .After(usesMockAnimation); | 943 .After(usesMockAnimation); |
| 944 EXPECT_CALL(*mockCurvePtr, delete_()) | 944 EXPECT_CALL(*mockCurvePtr, delete_()) |
| 945 .Times(1) | 945 .Times(1) |
| 946 .After(usesMockCurve); | 946 .After(usesMockCurve); |
| 947 | 947 |
| 948 // Go! | 948 // Go! |
| 949 Vector<OwnPtr<CompositorAnimation>> result; | 949 Vector<OwnPtr<CompositorAnimation>> result; |
| 950 getAnimationOnCompositor(m_timing, *effect, result); | 950 getAnimationOnCompositor(m_timing, *effect, result); |
| 951 EXPECT_EQ(1U, result.size()); | 951 EXPECT_EQ(1U, result.size()); |
| 952 result[0].clear(); | 952 result[0].reset(); |
| 953 } | 953 } |
| 954 | 954 |
| 955 TEST_F(AnimationCompositorAnimationsTest, createReversedOpacityAnimationNegative
StartDelay) | 955 TEST_F(AnimationCompositorAnimationsTest, createReversedOpacityAnimationNegative
StartDelay) |
| 956 { | 956 { |
| 957 // KeyframeEffect to convert | 957 // KeyframeEffect to convert |
| 958 AnimatableValueKeyframeEffectModel* effect = createKeyframeEffectModel( | 958 AnimatableValueKeyframeEffectModel* effect = createKeyframeEffectModel( |
| 959 createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(2.0
).get(), 0), | 959 createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(2.0
).get(), 0), |
| 960 createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(5.0
).get(), 1.0)); | 960 createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(5.0
).get(), 1.0)); |
| 961 | 961 |
| 962 m_timing.iterationCount = 5.0; | 962 m_timing.iterationCount = 5.0; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 990 .Times(1) | 990 .Times(1) |
| 991 .After(usesMockAnimation); | 991 .After(usesMockAnimation); |
| 992 EXPECT_CALL(*mockCurvePtr, delete_()) | 992 EXPECT_CALL(*mockCurvePtr, delete_()) |
| 993 .Times(1) | 993 .Times(1) |
| 994 .After(usesMockCurve); | 994 .After(usesMockCurve); |
| 995 | 995 |
| 996 // Go! | 996 // Go! |
| 997 Vector<OwnPtr<CompositorAnimation>> result; | 997 Vector<OwnPtr<CompositorAnimation>> result; |
| 998 getAnimationOnCompositor(m_timing, *effect, result); | 998 getAnimationOnCompositor(m_timing, *effect, result); |
| 999 EXPECT_EQ(1U, result.size()); | 999 EXPECT_EQ(1U, result.size()); |
| 1000 result[0].clear(); | 1000 result[0].reset(); |
| 1001 } | 1001 } |
| 1002 | 1002 |
| 1003 TEST_F(AnimationCompositorAnimationsTest, createSimpleOpacityAnimationPlaybackRa
tes) | 1003 TEST_F(AnimationCompositorAnimationsTest, createSimpleOpacityAnimationPlaybackRa
tes) |
| 1004 { | 1004 { |
| 1005 // KeyframeEffect to convert | 1005 // KeyframeEffect to convert |
| 1006 AnimatableValueKeyframeEffectModel* effect = createKeyframeEffectModel( | 1006 AnimatableValueKeyframeEffectModel* effect = createKeyframeEffectModel( |
| 1007 createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(2.0
).get(), 0), | 1007 createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(2.0
).get(), 0), |
| 1008 createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(5.0
).get(), 1.0)); | 1008 createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(5.0
).get(), 1.0)); |
| 1009 | 1009 |
| 1010 m_timing.playbackRate = 2; | 1010 m_timing.playbackRate = 2; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 1036 .After(usesMockAnimation); | 1036 .After(usesMockAnimation); |
| 1037 EXPECT_CALL(*mockCurvePtr, delete_()) | 1037 EXPECT_CALL(*mockCurvePtr, delete_()) |
| 1038 .Times(1) | 1038 .Times(1) |
| 1039 .After(usesMockCurve); | 1039 .After(usesMockCurve); |
| 1040 | 1040 |
| 1041 // Go! | 1041 // Go! |
| 1042 Vector<OwnPtr<CompositorAnimation>> result; | 1042 Vector<OwnPtr<CompositorAnimation>> result; |
| 1043 // Set player plaback rate also | 1043 // Set player plaback rate also |
| 1044 getAnimationOnCompositor(m_timing, *effect, result, -1.5); | 1044 getAnimationOnCompositor(m_timing, *effect, result, -1.5); |
| 1045 EXPECT_EQ(1U, result.size()); | 1045 EXPECT_EQ(1U, result.size()); |
| 1046 result[0].clear(); | 1046 result[0].reset(); |
| 1047 } | 1047 } |
| 1048 | 1048 |
| 1049 TEST_F(AnimationCompositorAnimationsTest, createSimpleOpacityAnimationFillModeNo
ne) | 1049 TEST_F(AnimationCompositorAnimationsTest, createSimpleOpacityAnimationFillModeNo
ne) |
| 1050 { | 1050 { |
| 1051 // KeyframeEffect to convert | 1051 // KeyframeEffect to convert |
| 1052 AnimatableValueKeyframeEffectModel* effect = createKeyframeEffectModel( | 1052 AnimatableValueKeyframeEffectModel* effect = createKeyframeEffectModel( |
| 1053 createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(2.0
).get(), 0), | 1053 createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(2.0
).get(), 0), |
| 1054 createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(5.0
).get(), 1.0)); | 1054 createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(5.0
).get(), 1.0)); |
| 1055 | 1055 |
| 1056 m_timing.fillMode = Timing::FillModeNone; | 1056 m_timing.fillMode = Timing::FillModeNone; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 1081 .Times(1) | 1081 .Times(1) |
| 1082 .After(usesMockAnimation); | 1082 .After(usesMockAnimation); |
| 1083 EXPECT_CALL(*mockCurvePtr, delete_()) | 1083 EXPECT_CALL(*mockCurvePtr, delete_()) |
| 1084 .Times(1) | 1084 .Times(1) |
| 1085 .After(usesMockCurve); | 1085 .After(usesMockCurve); |
| 1086 | 1086 |
| 1087 // Go! | 1087 // Go! |
| 1088 Vector<OwnPtr<CompositorAnimation>> result; | 1088 Vector<OwnPtr<CompositorAnimation>> result; |
| 1089 getAnimationOnCompositor(m_timing, *effect, result); | 1089 getAnimationOnCompositor(m_timing, *effect, result); |
| 1090 EXPECT_EQ(1U, result.size()); | 1090 EXPECT_EQ(1U, result.size()); |
| 1091 result[0].clear(); | 1091 result[0].reset(); |
| 1092 } | 1092 } |
| 1093 | 1093 |
| 1094 TEST_F(AnimationCompositorAnimationsTest, createSimpleOpacityAnimationFillModeAu
to) | 1094 TEST_F(AnimationCompositorAnimationsTest, createSimpleOpacityAnimationFillModeAu
to) |
| 1095 { | 1095 { |
| 1096 // KeyframeEffect to convert | 1096 // KeyframeEffect to convert |
| 1097 AnimatableValueKeyframeEffectModel* effect = createKeyframeEffectModel( | 1097 AnimatableValueKeyframeEffectModel* effect = createKeyframeEffectModel( |
| 1098 createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(2.0
).get(), 0), | 1098 createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(2.0
).get(), 0), |
| 1099 createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(5.0
).get(), 1.0)); | 1099 createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(5.0
).get(), 1.0)); |
| 1100 | 1100 |
| 1101 m_timing.fillMode = Timing::FillModeAuto; | 1101 m_timing.fillMode = Timing::FillModeAuto; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 1126 .Times(1) | 1126 .Times(1) |
| 1127 .After(usesMockAnimation); | 1127 .After(usesMockAnimation); |
| 1128 EXPECT_CALL(*mockCurvePtr, delete_()) | 1128 EXPECT_CALL(*mockCurvePtr, delete_()) |
| 1129 .Times(1) | 1129 .Times(1) |
| 1130 .After(usesMockCurve); | 1130 .After(usesMockCurve); |
| 1131 | 1131 |
| 1132 // Go! | 1132 // Go! |
| 1133 Vector<OwnPtr<CompositorAnimation>> result; | 1133 Vector<OwnPtr<CompositorAnimation>> result; |
| 1134 getAnimationOnCompositor(m_timing, *effect, result); | 1134 getAnimationOnCompositor(m_timing, *effect, result); |
| 1135 EXPECT_EQ(1U, result.size()); | 1135 EXPECT_EQ(1U, result.size()); |
| 1136 result[0].clear(); | 1136 result[0].reset(); |
| 1137 } | 1137 } |
| 1138 | 1138 |
| 1139 TEST_F(AnimationCompositorAnimationsTest, createSimpleOpacityAnimationWithTiming
Function) | 1139 TEST_F(AnimationCompositorAnimationsTest, createSimpleOpacityAnimationWithTiming
Function) |
| 1140 { | 1140 { |
| 1141 // KeyframeEffect to convert | 1141 // KeyframeEffect to convert |
| 1142 AnimatableValueKeyframeEffectModel* effect = createKeyframeEffectModel( | 1142 AnimatableValueKeyframeEffectModel* effect = createKeyframeEffectModel( |
| 1143 createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(2.0
).get(), 0), | 1143 createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(2.0
).get(), 0), |
| 1144 createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(5.0
).get(), 1.0)); | 1144 createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(5.0
).get(), 1.0)); |
| 1145 | 1145 |
| 1146 m_timing.timingFunction = m_cubicCustomTimingFunction; | 1146 m_timing.timingFunction = m_cubicCustomTimingFunction; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 1171 .Times(1) | 1171 .Times(1) |
| 1172 .After(usesMockAnimation); | 1172 .After(usesMockAnimation); |
| 1173 EXPECT_CALL(*mockCurvePtr, delete_()) | 1173 EXPECT_CALL(*mockCurvePtr, delete_()) |
| 1174 .Times(1) | 1174 .Times(1) |
| 1175 .After(usesMockCurve); | 1175 .After(usesMockCurve); |
| 1176 | 1176 |
| 1177 // Go! | 1177 // Go! |
| 1178 Vector<OwnPtr<CompositorAnimation>> result; | 1178 Vector<OwnPtr<CompositorAnimation>> result; |
| 1179 getAnimationOnCompositor(m_timing, *effect, result); | 1179 getAnimationOnCompositor(m_timing, *effect, result); |
| 1180 EXPECT_EQ(1U, result.size()); | 1180 EXPECT_EQ(1U, result.size()); |
| 1181 result[0].clear(); | 1181 result[0].reset(); |
| 1182 } | 1182 } |
| 1183 | 1183 |
| 1184 TEST_F(AnimationCompositorAnimationsTest, CancelIncompatibleCompositorAnimations
) | 1184 TEST_F(AnimationCompositorAnimationsTest, CancelIncompatibleCompositorAnimations
) |
| 1185 { | 1185 { |
| 1186 Persistent<Element> element = m_document->createElement("shared", ASSERT_NO_
EXCEPTION); | 1186 Persistent<Element> element = m_document->createElement("shared", ASSERT_NO_
EXCEPTION); |
| 1187 | 1187 |
| 1188 LayoutObjectProxy* layoutObject = LayoutObjectProxy::create(element.get()); | 1188 LayoutObjectProxy* layoutObject = LayoutObjectProxy::create(element.get()); |
| 1189 element->setLayoutObject(layoutObject); | 1189 element->setLayoutObject(layoutObject); |
| 1190 | 1190 |
| 1191 AnimatableValueKeyframeVector keyFrames; | 1191 AnimatableValueKeyframeVector keyFrames; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1225 simulateFrame(1.); | 1225 simulateFrame(1.); |
| 1226 | 1226 |
| 1227 element->setLayoutObject(nullptr); | 1227 element->setLayoutObject(nullptr); |
| 1228 LayoutObjectProxy::dispose(layoutObject); | 1228 LayoutObjectProxy::dispose(layoutObject); |
| 1229 | 1229 |
| 1230 ThreadHeap::collectAllGarbage(); | 1230 ThreadHeap::collectAllGarbage(); |
| 1231 EXPECT_TRUE(element->elementAnimations()->animations().isEmpty()); | 1231 EXPECT_TRUE(element->elementAnimations()->animations().isEmpty()); |
| 1232 } | 1232 } |
| 1233 | 1233 |
| 1234 } // namespace blink | 1234 } // namespace blink |
| OLD | NEW |