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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 public: | 115 public: |
116 | 116 |
117 bool convertTimingForCompositor(const Timing& t, CompositorAnimationsImpl::C
ompositorTiming& out) | 117 bool convertTimingForCompositor(const Timing& t, CompositorAnimationsImpl::C
ompositorTiming& out) |
118 { | 118 { |
119 return CompositorAnimationsImpl::convertTimingForCompositor(t, 0, out, 1
); | 119 return CompositorAnimationsImpl::convertTimingForCompositor(t, 0, out, 1
); |
120 } | 120 } |
121 bool isCandidateForAnimationOnCompositor(const Timing& timing, const Animati
onEffect& effect) | 121 bool isCandidateForAnimationOnCompositor(const Timing& timing, const Animati
onEffect& effect) |
122 { | 122 { |
123 return CompositorAnimations::instance()->isCandidateForAnimationOnCompos
itor(timing, *m_element.get(), nullptr, effect, 1); | 123 return CompositorAnimations::instance()->isCandidateForAnimationOnCompos
itor(timing, *m_element.get(), nullptr, effect, 1); |
124 } | 124 } |
125 void getAnimationOnCompositor(Timing& timing, AnimatableValueKeyframeEffectM
odel& effect, Vector<OwnPtr<WebCompositorAnimation> >& animations) | 125 void getAnimationOnCompositor(Timing& timing, AnimatableValueKeyframeEffectM
odel& effect, Vector<OwnPtr<WebCompositorAnimation>>& animations) |
126 { | 126 { |
127 return getAnimationOnCompositor(timing, effect, animations, 1); | 127 return getAnimationOnCompositor(timing, effect, animations, 1); |
128 } | 128 } |
129 void getAnimationOnCompositor(Timing& timing, AnimatableValueKeyframeEffectM
odel& effect, Vector<OwnPtr<WebCompositorAnimation> >& animations, double player
PlaybackRate) | 129 void getAnimationOnCompositor(Timing& timing, AnimatableValueKeyframeEffectM
odel& effect, Vector<OwnPtr<WebCompositorAnimation>>& animations, double playerP
laybackRate) |
130 { | 130 { |
131 return CompositorAnimationsImpl::getAnimationOnCompositor(timing, 0, std
::numeric_limits<double>::quiet_NaN(), 0, effect, animations, playerPlaybackRate
); | 131 return CompositorAnimationsImpl::getAnimationOnCompositor(timing, 0, std
::numeric_limits<double>::quiet_NaN(), 0, effect, animations, playerPlaybackRate
); |
132 } | 132 } |
133 bool getAnimationBounds(FloatBox& boundingBox, const AnimationEffect& effect
, double minValue, double maxValue) | 133 bool getAnimationBounds(FloatBox& boundingBox, const AnimationEffect& effect
, double minValue, double maxValue) |
134 { | 134 { |
135 return CompositorAnimations::instance()->getAnimatedBoundingBox(bounding
Box, effect, minValue, maxValue); | 135 return CompositorAnimations::instance()->getAnimatedBoundingBox(bounding
Box, effect, minValue, maxValue); |
136 } | 136 } |
137 | 137 |
138 bool duplicateSingleKeyframeAndTestIsCandidateOnResult(AnimatableValueKeyfra
me* frame) | 138 bool duplicateSingleKeyframeAndTestIsCandidateOnResult(AnimatableValueKeyfra
me* frame) |
139 { | 139 { |
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
665 | 665 |
666 EXPECT_CALL(*mockAnimationPtr, delete_()) | 666 EXPECT_CALL(*mockAnimationPtr, delete_()) |
667 .Times(1) | 667 .Times(1) |
668 .After(usesMockAnimation); | 668 .After(usesMockAnimation); |
669 EXPECT_CALL(*mockCurvePtr, delete_()) | 669 EXPECT_CALL(*mockCurvePtr, delete_()) |
670 .Times(1) | 670 .Times(1) |
671 .After(usesMockCurve); | 671 .After(usesMockCurve); |
672 | 672 |
673 // Go! | 673 // Go! |
674 setCompositorForTesting(mockCompositor); | 674 setCompositorForTesting(mockCompositor); |
675 Vector<OwnPtr<WebCompositorAnimation> > result; | 675 Vector<OwnPtr<WebCompositorAnimation>> result; |
676 getAnimationOnCompositor(m_timing, *effect.get(), result); | 676 getAnimationOnCompositor(m_timing, *effect.get(), result); |
677 EXPECT_EQ(1U, result.size()); | 677 EXPECT_EQ(1U, result.size()); |
678 result[0].clear(); | 678 result[0].clear(); |
679 } | 679 } |
680 | 680 |
681 TEST_F(AnimationCompositorAnimationsTest, createSimpleOpacityAnimationDuration) | 681 TEST_F(AnimationCompositorAnimationsTest, createSimpleOpacityAnimationDuration) |
682 { | 682 { |
683 // Animation to convert | 683 // Animation to convert |
684 RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = createKeyfra
meEffectModel( | 684 RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = createKeyfra
meEffectModel( |
685 createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(2.0
).get(), 0), | 685 createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(2.0
).get(), 0), |
(...skipping 27 matching lines...) Expand all Loading... |
713 | 713 |
714 EXPECT_CALL(*mockAnimationPtr, delete_()) | 714 EXPECT_CALL(*mockAnimationPtr, delete_()) |
715 .Times(1) | 715 .Times(1) |
716 .After(usesMockAnimation); | 716 .After(usesMockAnimation); |
717 EXPECT_CALL(*mockCurvePtr, delete_()) | 717 EXPECT_CALL(*mockCurvePtr, delete_()) |
718 .Times(1) | 718 .Times(1) |
719 .After(usesMockCurve); | 719 .After(usesMockCurve); |
720 | 720 |
721 // Go! | 721 // Go! |
722 setCompositorForTesting(mockCompositor); | 722 setCompositorForTesting(mockCompositor); |
723 Vector<OwnPtr<WebCompositorAnimation> > result; | 723 Vector<OwnPtr<WebCompositorAnimation>> result; |
724 getAnimationOnCompositor(m_timing, *effect.get(), result); | 724 getAnimationOnCompositor(m_timing, *effect.get(), result); |
725 EXPECT_EQ(1U, result.size()); | 725 EXPECT_EQ(1U, result.size()); |
726 result[0].clear(); | 726 result[0].clear(); |
727 } | 727 } |
728 | 728 |
729 TEST_F(AnimationCompositorAnimationsTest, createMultipleKeyframeOpacityAnimation
Linear) | 729 TEST_F(AnimationCompositorAnimationsTest, createMultipleKeyframeOpacityAnimation
Linear) |
730 { | 730 { |
731 // Animation to convert | 731 // Animation to convert |
732 RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = createKeyfra
meEffectModel( | 732 RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = createKeyfra
meEffectModel( |
733 createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(2.0
).get(), 0), | 733 createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(2.0
).get(), 0), |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
768 | 768 |
769 EXPECT_CALL(*mockAnimationPtr, delete_()) | 769 EXPECT_CALL(*mockAnimationPtr, delete_()) |
770 .Times(1) | 770 .Times(1) |
771 .After(usesMockAnimation); | 771 .After(usesMockAnimation); |
772 EXPECT_CALL(*mockCurvePtr, delete_()) | 772 EXPECT_CALL(*mockCurvePtr, delete_()) |
773 .Times(1) | 773 .Times(1) |
774 .After(usesMockCurve); | 774 .After(usesMockCurve); |
775 | 775 |
776 // Go! | 776 // Go! |
777 setCompositorForTesting(mockCompositor); | 777 setCompositorForTesting(mockCompositor); |
778 Vector<OwnPtr<WebCompositorAnimation> > result; | 778 Vector<OwnPtr<WebCompositorAnimation>> result; |
779 getAnimationOnCompositor(m_timing, *effect.get(), result); | 779 getAnimationOnCompositor(m_timing, *effect.get(), result); |
780 EXPECT_EQ(1U, result.size()); | 780 EXPECT_EQ(1U, result.size()); |
781 result[0].clear(); | 781 result[0].clear(); |
782 } | 782 } |
783 | 783 |
784 TEST_F(AnimationCompositorAnimationsTest, createSimpleOpacityAnimationStartDelay
) | 784 TEST_F(AnimationCompositorAnimationsTest, createSimpleOpacityAnimationStartDelay
) |
785 { | 785 { |
786 // Animation to convert | 786 // Animation to convert |
787 RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = createKeyfra
meEffectModel( | 787 RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = createKeyfra
meEffectModel( |
788 createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(2.0
).get(), 0), | 788 createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(2.0
).get(), 0), |
(...skipping 29 matching lines...) Expand all Loading... |
818 | 818 |
819 EXPECT_CALL(*mockAnimationPtr, delete_()) | 819 EXPECT_CALL(*mockAnimationPtr, delete_()) |
820 .Times(1) | 820 .Times(1) |
821 .After(usesMockAnimation); | 821 .After(usesMockAnimation); |
822 EXPECT_CALL(*mockCurvePtr, delete_()) | 822 EXPECT_CALL(*mockCurvePtr, delete_()) |
823 .Times(1) | 823 .Times(1) |
824 .After(usesMockCurve); | 824 .After(usesMockCurve); |
825 | 825 |
826 // Go! | 826 // Go! |
827 setCompositorForTesting(mockCompositor); | 827 setCompositorForTesting(mockCompositor); |
828 Vector<OwnPtr<WebCompositorAnimation> > result; | 828 Vector<OwnPtr<WebCompositorAnimation>> result; |
829 getAnimationOnCompositor(m_timing, *effect.get(), result); | 829 getAnimationOnCompositor(m_timing, *effect.get(), result); |
830 EXPECT_EQ(1U, result.size()); | 830 EXPECT_EQ(1U, result.size()); |
831 result[0].clear(); | 831 result[0].clear(); |
832 } | 832 } |
833 | 833 |
834 TEST_F(AnimationCompositorAnimationsTest, createMultipleKeyframeOpacityAnimation
Chained) | 834 TEST_F(AnimationCompositorAnimationsTest, createMultipleKeyframeOpacityAnimation
Chained) |
835 { | 835 { |
836 // Animation to convert | 836 // Animation to convert |
837 AnimatableValueKeyframeVector frames; | 837 AnimatableValueKeyframeVector frames; |
838 frames.append(createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::
create(2.0).get(), 0)); | 838 frames.append(createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::
create(2.0).get(), 0)); |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
878 | 878 |
879 EXPECT_CALL(*mockAnimationPtr, delete_()) | 879 EXPECT_CALL(*mockAnimationPtr, delete_()) |
880 .Times(1) | 880 .Times(1) |
881 .After(usesMockAnimation); | 881 .After(usesMockAnimation); |
882 EXPECT_CALL(*mockCurvePtr, delete_()) | 882 EXPECT_CALL(*mockCurvePtr, delete_()) |
883 .Times(1) | 883 .Times(1) |
884 .After(usesMockCurve); | 884 .After(usesMockCurve); |
885 | 885 |
886 // Go! | 886 // Go! |
887 setCompositorForTesting(mockCompositor); | 887 setCompositorForTesting(mockCompositor); |
888 Vector<OwnPtr<WebCompositorAnimation> > result; | 888 Vector<OwnPtr<WebCompositorAnimation>> result; |
889 getAnimationOnCompositor(m_timing, *effect.get(), result); | 889 getAnimationOnCompositor(m_timing, *effect.get(), result); |
890 EXPECT_EQ(1U, result.size()); | 890 EXPECT_EQ(1U, result.size()); |
891 result[0].clear(); | 891 result[0].clear(); |
892 } | 892 } |
893 | 893 |
894 TEST_F(AnimationCompositorAnimationsTest, createReversedOpacityAnimation) | 894 TEST_F(AnimationCompositorAnimationsTest, createReversedOpacityAnimation) |
895 { | 895 { |
896 RefPtr<TimingFunction> cubicEasyFlipTimingFunction = CubicBezierTimingFuncti
on::create(0.0, 0.0, 0.0, 1.0); | 896 RefPtr<TimingFunction> cubicEasyFlipTimingFunction = CubicBezierTimingFuncti
on::create(0.0, 0.0, 0.0, 1.0); |
897 | 897 |
898 // Animation to convert | 898 // Animation to convert |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
939 | 939 |
940 EXPECT_CALL(*mockAnimationPtr, delete_()) | 940 EXPECT_CALL(*mockAnimationPtr, delete_()) |
941 .Times(1) | 941 .Times(1) |
942 .After(usesMockAnimation); | 942 .After(usesMockAnimation); |
943 EXPECT_CALL(*mockCurvePtr, delete_()) | 943 EXPECT_CALL(*mockCurvePtr, delete_()) |
944 .Times(1) | 944 .Times(1) |
945 .After(usesMockCurve); | 945 .After(usesMockCurve); |
946 | 946 |
947 // Go! | 947 // Go! |
948 setCompositorForTesting(mockCompositor); | 948 setCompositorForTesting(mockCompositor); |
949 Vector<OwnPtr<WebCompositorAnimation> > result; | 949 Vector<OwnPtr<WebCompositorAnimation>> result; |
950 getAnimationOnCompositor(m_timing, *effect.get(), result); | 950 getAnimationOnCompositor(m_timing, *effect.get(), result); |
951 EXPECT_EQ(1U, result.size()); | 951 EXPECT_EQ(1U, result.size()); |
952 result[0].clear(); | 952 result[0].clear(); |
953 } | 953 } |
954 | 954 |
955 TEST_F(AnimationCompositorAnimationsTest, createReversedOpacityAnimationNegative
StartDelay) | 955 TEST_F(AnimationCompositorAnimationsTest, createReversedOpacityAnimationNegative
StartDelay) |
956 { | 956 { |
957 // Animation to convert | 957 // Animation to convert |
958 RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = createKeyfra
meEffectModel( | 958 RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = createKeyfra
meEffectModel( |
959 createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(2.0
).get(), 0), | 959 createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(2.0
).get(), 0), |
(...skipping 30 matching lines...) Expand all Loading... |
990 | 990 |
991 EXPECT_CALL(*mockAnimationPtr, delete_()) | 991 EXPECT_CALL(*mockAnimationPtr, delete_()) |
992 .Times(1) | 992 .Times(1) |
993 .After(usesMockAnimation); | 993 .After(usesMockAnimation); |
994 EXPECT_CALL(*mockCurvePtr, delete_()) | 994 EXPECT_CALL(*mockCurvePtr, delete_()) |
995 .Times(1) | 995 .Times(1) |
996 .After(usesMockCurve); | 996 .After(usesMockCurve); |
997 | 997 |
998 // Go! | 998 // Go! |
999 setCompositorForTesting(mockCompositor); | 999 setCompositorForTesting(mockCompositor); |
1000 Vector<OwnPtr<WebCompositorAnimation> > result; | 1000 Vector<OwnPtr<WebCompositorAnimation>> result; |
1001 getAnimationOnCompositor(m_timing, *effect.get(), result); | 1001 getAnimationOnCompositor(m_timing, *effect.get(), result); |
1002 EXPECT_EQ(1U, result.size()); | 1002 EXPECT_EQ(1U, result.size()); |
1003 result[0].clear(); | 1003 result[0].clear(); |
1004 } | 1004 } |
1005 | 1005 |
1006 TEST_F(AnimationCompositorAnimationsTest, createSimpleOpacityAnimationPlaybackRa
tes) | 1006 TEST_F(AnimationCompositorAnimationsTest, createSimpleOpacityAnimationPlaybackRa
tes) |
1007 { | 1007 { |
1008 // Animation to convert | 1008 // Animation to convert |
1009 RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = createKeyfra
meEffectModel( | 1009 RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = createKeyfra
meEffectModel( |
1010 createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(2.0
).get(), 0), | 1010 createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(2.0
).get(), 0), |
(...skipping 27 matching lines...) Expand all Loading... |
1038 | 1038 |
1039 EXPECT_CALL(*mockAnimationPtr, delete_()) | 1039 EXPECT_CALL(*mockAnimationPtr, delete_()) |
1040 .Times(1) | 1040 .Times(1) |
1041 .After(usesMockAnimation); | 1041 .After(usesMockAnimation); |
1042 EXPECT_CALL(*mockCurvePtr, delete_()) | 1042 EXPECT_CALL(*mockCurvePtr, delete_()) |
1043 .Times(1) | 1043 .Times(1) |
1044 .After(usesMockCurve); | 1044 .After(usesMockCurve); |
1045 | 1045 |
1046 // Go! | 1046 // Go! |
1047 setCompositorForTesting(mockCompositor); | 1047 setCompositorForTesting(mockCompositor); |
1048 Vector<OwnPtr<WebCompositorAnimation> > result; | 1048 Vector<OwnPtr<WebCompositorAnimation>> result; |
1049 // Set player plaback rate also | 1049 // Set player plaback rate also |
1050 getAnimationOnCompositor(m_timing, *effect.get(), result, -1.5); | 1050 getAnimationOnCompositor(m_timing, *effect.get(), result, -1.5); |
1051 EXPECT_EQ(1U, result.size()); | 1051 EXPECT_EQ(1U, result.size()); |
1052 result[0].clear(); | 1052 result[0].clear(); |
1053 } | 1053 } |
1054 | 1054 |
1055 TEST_F(AnimationCompositorAnimationsTest, createSimpleOpacityAnimationFillModeNo
ne) | 1055 TEST_F(AnimationCompositorAnimationsTest, createSimpleOpacityAnimationFillModeNo
ne) |
1056 { | 1056 { |
1057 // Animation to convert | 1057 // Animation to convert |
1058 RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = createKeyfra
meEffectModel( | 1058 RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = createKeyfra
meEffectModel( |
(...skipping 28 matching lines...) Expand all Loading... |
1087 | 1087 |
1088 EXPECT_CALL(*mockAnimationPtr, delete_()) | 1088 EXPECT_CALL(*mockAnimationPtr, delete_()) |
1089 .Times(1) | 1089 .Times(1) |
1090 .After(usesMockAnimation); | 1090 .After(usesMockAnimation); |
1091 EXPECT_CALL(*mockCurvePtr, delete_()) | 1091 EXPECT_CALL(*mockCurvePtr, delete_()) |
1092 .Times(1) | 1092 .Times(1) |
1093 .After(usesMockCurve); | 1093 .After(usesMockCurve); |
1094 | 1094 |
1095 // Go! | 1095 // Go! |
1096 setCompositorForTesting(mockCompositor); | 1096 setCompositorForTesting(mockCompositor); |
1097 Vector<OwnPtr<WebCompositorAnimation> > result; | 1097 Vector<OwnPtr<WebCompositorAnimation>> result; |
1098 getAnimationOnCompositor(m_timing, *effect.get(), result); | 1098 getAnimationOnCompositor(m_timing, *effect.get(), result); |
1099 EXPECT_EQ(1U, result.size()); | 1099 EXPECT_EQ(1U, result.size()); |
1100 result[0].clear(); | 1100 result[0].clear(); |
1101 } | 1101 } |
1102 | 1102 |
1103 TEST_F(AnimationCompositorAnimationsTest, createSimpleOpacityAnimationFillModeAu
to) | 1103 TEST_F(AnimationCompositorAnimationsTest, createSimpleOpacityAnimationFillModeAu
to) |
1104 { | 1104 { |
1105 // Animation to convert | 1105 // Animation to convert |
1106 RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = createKeyfra
meEffectModel( | 1106 RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = createKeyfra
meEffectModel( |
1107 createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(2.0
).get(), 0), | 1107 createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(2.0
).get(), 0), |
(...skipping 27 matching lines...) Expand all Loading... |
1135 | 1135 |
1136 EXPECT_CALL(*mockAnimationPtr, delete_()) | 1136 EXPECT_CALL(*mockAnimationPtr, delete_()) |
1137 .Times(1) | 1137 .Times(1) |
1138 .After(usesMockAnimation); | 1138 .After(usesMockAnimation); |
1139 EXPECT_CALL(*mockCurvePtr, delete_()) | 1139 EXPECT_CALL(*mockCurvePtr, delete_()) |
1140 .Times(1) | 1140 .Times(1) |
1141 .After(usesMockCurve); | 1141 .After(usesMockCurve); |
1142 | 1142 |
1143 // Go! | 1143 // Go! |
1144 setCompositorForTesting(mockCompositor); | 1144 setCompositorForTesting(mockCompositor); |
1145 Vector<OwnPtr<WebCompositorAnimation> > result; | 1145 Vector<OwnPtr<WebCompositorAnimation>> result; |
1146 getAnimationOnCompositor(m_timing, *effect.get(), result); | 1146 getAnimationOnCompositor(m_timing, *effect.get(), result); |
1147 EXPECT_EQ(1U, result.size()); | 1147 EXPECT_EQ(1U, result.size()); |
1148 result[0].clear(); | 1148 result[0].clear(); |
1149 } | 1149 } |
1150 | 1150 |
1151 TEST_F(AnimationCompositorAnimationsTest, createSimpleOpacityAnimationWithTiming
Function) | 1151 TEST_F(AnimationCompositorAnimationsTest, createSimpleOpacityAnimationWithTiming
Function) |
1152 { | 1152 { |
1153 // Animation to convert | 1153 // Animation to convert |
1154 RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = createKeyfra
meEffectModel( | 1154 RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = createKeyfra
meEffectModel( |
1155 createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(2.0
).get(), 0), | 1155 createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(2.0
).get(), 0), |
(...skipping 27 matching lines...) Expand all Loading... |
1183 | 1183 |
1184 EXPECT_CALL(*mockAnimationPtr, delete_()) | 1184 EXPECT_CALL(*mockAnimationPtr, delete_()) |
1185 .Times(1) | 1185 .Times(1) |
1186 .After(usesMockAnimation); | 1186 .After(usesMockAnimation); |
1187 EXPECT_CALL(*mockCurvePtr, delete_()) | 1187 EXPECT_CALL(*mockCurvePtr, delete_()) |
1188 .Times(1) | 1188 .Times(1) |
1189 .After(usesMockCurve); | 1189 .After(usesMockCurve); |
1190 | 1190 |
1191 // Go! | 1191 // Go! |
1192 setCompositorForTesting(mockCompositor); | 1192 setCompositorForTesting(mockCompositor); |
1193 Vector<OwnPtr<WebCompositorAnimation> > result; | 1193 Vector<OwnPtr<WebCompositorAnimation>> result; |
1194 getAnimationOnCompositor(m_timing, *effect.get(), result); | 1194 getAnimationOnCompositor(m_timing, *effect.get(), result); |
1195 EXPECT_EQ(1U, result.size()); | 1195 EXPECT_EQ(1U, result.size()); |
1196 result[0].clear(); | 1196 result[0].clear(); |
1197 } | 1197 } |
1198 | 1198 |
1199 TEST_F(AnimationCompositorAnimationsTest, CancelIncompatibleCompositorAnimations
) | 1199 TEST_F(AnimationCompositorAnimationsTest, CancelIncompatibleCompositorAnimations
) |
1200 { | 1200 { |
1201 WebCompositorSupportMock mockCompositor; | 1201 WebCompositorSupportMock mockCompositor; |
1202 setCompositorForTesting(mockCompositor); | 1202 setCompositorForTesting(mockCompositor); |
1203 | 1203 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1245 element->setLayoutObject(nullptr); | 1245 element->setLayoutObject(nullptr); |
1246 LayoutObjectProxy::dispose(layoutObject); | 1246 LayoutObjectProxy::dispose(layoutObject); |
1247 | 1247 |
1248 player1.release(); | 1248 player1.release(); |
1249 player2.release(); | 1249 player2.release(); |
1250 Heap::collectAllGarbage(); | 1250 Heap::collectAllGarbage(); |
1251 EXPECT_TRUE(element->elementAnimations()->players().isEmpty()); | 1251 EXPECT_TRUE(element->elementAnimations()->players().isEmpty()); |
1252 } | 1252 } |
1253 | 1253 |
1254 } // namespace blink | 1254 } // namespace blink |
OLD | NEW |