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

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

Issue 1115553002: Removing blink::prefix (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 7 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
« no previous file with comments | « Source/core/animation/CompositorAnimations.cpp ('k') | Source/core/animation/Keyframe.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 642 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 653
654 // Create animation 654 // Create animation
655 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc k(WebCompositorAnimation::TargetPropertyOpacity); 655 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc k(WebCompositorAnimation::TargetPropertyOpacity);
656 ExpectationSet usesMockAnimation; 656 ExpectationSet usesMockAnimation;
657 657
658 usesMockCurve += EXPECT_CALL(mockCompositor, createAnimation(Ref(*mockCurveP tr), WebCompositorAnimation::TargetPropertyOpacity, _, _)) 658 usesMockCurve += EXPECT_CALL(mockCompositor, createAnimation(Ref(*mockCurveP tr), WebCompositorAnimation::TargetPropertyOpacity, _, _))
659 .WillOnce(Return(mockAnimationPtr)); 659 .WillOnce(Return(mockAnimationPtr));
660 660
661 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(1)); 661 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(1));
662 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(0.0)); 662 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(0.0));
663 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(blink::WebC ompositorAnimation::DirectionNormal)); 663 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(WebComposit orAnimation::DirectionNormal));
664 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(1)); 664 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(1));
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!
(...skipping 27 matching lines...) Expand all
701 701
702 // Create animation 702 // Create animation
703 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc k(WebCompositorAnimation::TargetPropertyOpacity); 703 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc k(WebCompositorAnimation::TargetPropertyOpacity);
704 ExpectationSet usesMockAnimation; 704 ExpectationSet usesMockAnimation;
705 705
706 usesMockCurve += EXPECT_CALL(mockCompositor, createAnimation(Ref(*mockCurveP tr), WebCompositorAnimation::TargetPropertyOpacity, _, _)) 706 usesMockCurve += EXPECT_CALL(mockCompositor, createAnimation(Ref(*mockCurveP tr), WebCompositorAnimation::TargetPropertyOpacity, _, _))
707 .WillOnce(Return(mockAnimationPtr)); 707 .WillOnce(Return(mockAnimationPtr));
708 708
709 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(1)); 709 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(1));
710 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(0.0)); 710 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(0.0));
711 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(blink::WebC ompositorAnimation::DirectionNormal)); 711 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(WebComposit orAnimation::DirectionNormal));
712 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(1)); 712 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(1));
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!
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
756 756
757 // Animation is created 757 // Animation is created
758 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc k(WebCompositorAnimation::TargetPropertyOpacity); 758 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc k(WebCompositorAnimation::TargetPropertyOpacity);
759 ExpectationSet usesMockAnimation; 759 ExpectationSet usesMockAnimation;
760 760
761 usesMockCurve += EXPECT_CALL(mockCompositor, createAnimation(Ref(*mockCurveP tr), WebCompositorAnimation::TargetPropertyOpacity, _, _)) 761 usesMockCurve += EXPECT_CALL(mockCompositor, createAnimation(Ref(*mockCurveP tr), WebCompositorAnimation::TargetPropertyOpacity, _, _))
762 .WillOnce(Return(mockAnimationPtr)); 762 .WillOnce(Return(mockAnimationPtr));
763 763
764 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(5)); 764 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(5));
765 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(0.0)); 765 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(0.0));
766 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(blink::WebC ompositorAnimation::DirectionAlternate)); 766 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(WebComposit orAnimation::DirectionAlternate));
767 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(2.0)); 767 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(2.0));
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!
(...skipping 29 matching lines...) Expand all
806 806
807 // Create animation 807 // Create animation
808 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc k(WebCompositorAnimation::TargetPropertyOpacity); 808 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc k(WebCompositorAnimation::TargetPropertyOpacity);
809 ExpectationSet usesMockAnimation; 809 ExpectationSet usesMockAnimation;
810 810
811 usesMockCurve += EXPECT_CALL(mockCompositor, createAnimation(Ref(*mockCurveP tr), WebCompositorAnimation::TargetPropertyOpacity, _, _)) 811 usesMockCurve += EXPECT_CALL(mockCompositor, createAnimation(Ref(*mockCurveP tr), WebCompositorAnimation::TargetPropertyOpacity, _, _))
812 .WillOnce(Return(mockAnimationPtr)); 812 .WillOnce(Return(mockAnimationPtr));
813 813
814 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(5)); 814 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(5));
815 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(-3.25)); 815 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(-3.25));
816 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(blink::WebC ompositorAnimation::DirectionNormal)); 816 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(WebComposit orAnimation::DirectionNormal));
817 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(1)); 817 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(1));
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!
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
866 866
867 // Animation is created 867 // Animation is created
868 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc k(WebCompositorAnimation::TargetPropertyOpacity); 868 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc k(WebCompositorAnimation::TargetPropertyOpacity);
869 ExpectationSet usesMockAnimation; 869 ExpectationSet usesMockAnimation;
870 870
871 usesMockCurve += EXPECT_CALL(mockCompositor, createAnimation(Ref(*mockCurveP tr), WebCompositorAnimation::TargetPropertyOpacity, _, _)) 871 usesMockCurve += EXPECT_CALL(mockCompositor, createAnimation(Ref(*mockCurveP tr), WebCompositorAnimation::TargetPropertyOpacity, _, _))
872 .WillOnce(Return(mockAnimationPtr)); 872 .WillOnce(Return(mockAnimationPtr));
873 873
874 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(10)); 874 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(10));
875 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(0.0)); 875 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(0.0));
876 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(blink::WebC ompositorAnimation::DirectionAlternate)); 876 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(WebComposit orAnimation::DirectionAlternate));
877 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(1)); 877 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(1));
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!
(...skipping 26 matching lines...) Expand all
913 913
914 WebCompositorSupportMock mockCompositor; 914 WebCompositorSupportMock mockCompositor;
915 915
916 // Curve is created 916 // Curve is created
917 WebFloatAnimationCurveMock* mockCurvePtr = new WebFloatAnimationCurveMock(); 917 WebFloatAnimationCurveMock* mockCurvePtr = new WebFloatAnimationCurveMock();
918 ExpectationSet usesMockCurve; 918 ExpectationSet usesMockCurve;
919 919
920 EXPECT_CALL(mockCompositor, createFloatAnimationCurve()) 920 EXPECT_CALL(mockCompositor, createFloatAnimationCurve())
921 .WillOnce(Return(mockCurvePtr)); 921 .WillOnce(Return(mockCurvePtr));
922 922
923 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(blink::WebFloatKeyframe(0.0, 2.0), blink::WebCompositorAnimationCurve::TimingFunctionTypeEaseIn)); 923 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(WebFloatKeyframe(0.0, 2.0), WebCompositorAnimationCurve::TimingFunctionTypeEaseIn));
924 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(blink::WebFloatKeyframe(0.25 , -1.0), blink::WebCompositorAnimationCurve::TimingFunctionTypeLinear)); 924 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(WebFloatKeyframe(0.25, -1.0) , WebCompositorAnimationCurve::TimingFunctionTypeLinear));
925 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(blink::WebFloatKeyframe(0.5, 20.0), 0.0, 0.0, 0.0, 1.0)); 925 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(WebFloatKeyframe(0.5, 20.0), 0.0, 0.0, 0.0, 1.0));
926 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(blink::WebFloatKeyframe(1.0, 5.0))); 926 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(WebFloatKeyframe(1.0, 5.0))) ;
927 927
928 // Create the animation 928 // Create the animation
929 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc k(WebCompositorAnimation::TargetPropertyOpacity); 929 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc k(WebCompositorAnimation::TargetPropertyOpacity);
930 ExpectationSet usesMockAnimation; 930 ExpectationSet usesMockAnimation;
931 931
932 usesMockCurve += EXPECT_CALL(mockCompositor, createAnimation(Ref(*mockCurveP tr), WebCompositorAnimation::TargetPropertyOpacity, _, _)) 932 usesMockCurve += EXPECT_CALL(mockCompositor, createAnimation(Ref(*mockCurveP tr), WebCompositorAnimation::TargetPropertyOpacity, _, _))
933 .WillOnce(Return(mockAnimationPtr)); 933 .WillOnce(Return(mockAnimationPtr));
934 934
935 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(10)); 935 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(10));
936 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(0.0)); 936 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(0.0));
937 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(blink::WebC ompositorAnimation::DirectionAlternateReverse)); 937 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(WebComposit orAnimation::DirectionAlternateReverse));
938 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(1)); 938 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(1));
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!
(...skipping 18 matching lines...) Expand all
966 // -- 966 // --
967 967
968 WebCompositorSupportMock mockCompositor; 968 WebCompositorSupportMock mockCompositor;
969 969
970 // Curve is created 970 // Curve is created
971 WebFloatAnimationCurveMock* mockCurvePtr = new WebFloatAnimationCurveMock; 971 WebFloatAnimationCurveMock* mockCurvePtr = new WebFloatAnimationCurveMock;
972 ExpectationSet usesMockCurve; 972 ExpectationSet usesMockCurve;
973 EXPECT_CALL(mockCompositor, createFloatAnimationCurve()) 973 EXPECT_CALL(mockCompositor, createFloatAnimationCurve())
974 .WillOnce(Return(mockCurvePtr)); 974 .WillOnce(Return(mockCurvePtr));
975 975
976 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(blink::WebFloatKeyframe(0.0, 2.0), blink::WebCompositorAnimationCurve::TimingFunctionTypeLinear)); 976 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(WebFloatKeyframe(0.0, 2.0), WebCompositorAnimationCurve::TimingFunctionTypeLinear));
977 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(blink::WebFloatKeyframe(1.5, 5.0))); 977 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(WebFloatKeyframe(1.5, 5.0))) ;
978 978
979 // Create animation 979 // Create animation
980 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc k(WebCompositorAnimation::TargetPropertyOpacity); 980 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc k(WebCompositorAnimation::TargetPropertyOpacity);
981 ExpectationSet usesMockAnimation; 981 ExpectationSet usesMockAnimation;
982 982
983 usesMockCurve += EXPECT_CALL(mockCompositor, createAnimation(Ref(*mockCurveP tr), WebCompositorAnimation::TargetPropertyOpacity, _, _)) 983 usesMockCurve += EXPECT_CALL(mockCompositor, createAnimation(Ref(*mockCurveP tr), WebCompositorAnimation::TargetPropertyOpacity, _, _))
984 .WillOnce(Return(mockAnimationPtr)); 984 .WillOnce(Return(mockAnimationPtr));
985 985
986 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(5)); 986 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(5));
987 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(3.0)); 987 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(3.0));
988 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(blink::WebC ompositorAnimation::DirectionAlternateReverse)); 988 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(WebComposit orAnimation::DirectionAlternateReverse));
989 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(1)); 989 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(1));
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!
(...skipping 27 matching lines...) Expand all
1026 1026
1027 // Create animation 1027 // Create animation
1028 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc k(WebCompositorAnimation::TargetPropertyOpacity); 1028 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc k(WebCompositorAnimation::TargetPropertyOpacity);
1029 ExpectationSet usesMockAnimation; 1029 ExpectationSet usesMockAnimation;
1030 1030
1031 usesMockCurve += EXPECT_CALL(mockCompositor, createAnimation(Ref(*mockCurveP tr), WebCompositorAnimation::TargetPropertyOpacity, _, _)) 1031 usesMockCurve += EXPECT_CALL(mockCompositor, createAnimation(Ref(*mockCurveP tr), WebCompositorAnimation::TargetPropertyOpacity, _, _))
1032 .WillOnce(Return(mockAnimationPtr)); 1032 .WillOnce(Return(mockAnimationPtr));
1033 1033
1034 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(1)); 1034 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(1));
1035 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(0.0)); 1035 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(0.0));
1036 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(blink::WebC ompositorAnimation::DirectionNormal)); 1036 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(WebComposit orAnimation::DirectionNormal));
1037 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(-3)); 1037 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(-3));
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!
(...skipping 27 matching lines...) Expand all
1074 1074
1075 // Create animation 1075 // Create animation
1076 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc k(WebCompositorAnimation::TargetPropertyOpacity); 1076 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc k(WebCompositorAnimation::TargetPropertyOpacity);
1077 ExpectationSet usesMockAnimation; 1077 ExpectationSet usesMockAnimation;
1078 1078
1079 usesMockCurve += EXPECT_CALL(mockCompositor, createAnimation(Ref(*mockCurveP tr), WebCompositorAnimation::TargetPropertyOpacity, _, _)) 1079 usesMockCurve += EXPECT_CALL(mockCompositor, createAnimation(Ref(*mockCurveP tr), WebCompositorAnimation::TargetPropertyOpacity, _, _))
1080 .WillOnce(Return(mockAnimationPtr)); 1080 .WillOnce(Return(mockAnimationPtr));
1081 1081
1082 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(1)); 1082 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(1));
1083 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(0.0)); 1083 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(0.0));
1084 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(blink::WebC ompositorAnimation::DirectionNormal)); 1084 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(WebComposit orAnimation::DirectionNormal));
1085 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(1)); 1085 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(1));
1086 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setFillMode(blink::WebCo mpositorAnimation::FillModeNone)); 1086 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setFillMode(WebComposito rAnimation::FillModeNone));
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);
(...skipping 25 matching lines...) Expand all
1122 1122
1123 // Create animation 1123 // Create animation
1124 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc k(WebCompositorAnimation::TargetPropertyOpacity); 1124 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc k(WebCompositorAnimation::TargetPropertyOpacity);
1125 ExpectationSet usesMockAnimation; 1125 ExpectationSet usesMockAnimation;
1126 1126
1127 usesMockCurve += EXPECT_CALL(mockCompositor, createAnimation(Ref(*mockCurveP tr), WebCompositorAnimation::TargetPropertyOpacity, _, _)) 1127 usesMockCurve += EXPECT_CALL(mockCompositor, createAnimation(Ref(*mockCurveP tr), WebCompositorAnimation::TargetPropertyOpacity, _, _))
1128 .WillOnce(Return(mockAnimationPtr)); 1128 .WillOnce(Return(mockAnimationPtr));
1129 1129
1130 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(1)); 1130 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(1));
1131 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(0.0)); 1131 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(0.0));
1132 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(blink::WebC ompositorAnimation::DirectionNormal)); 1132 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(WebComposit orAnimation::DirectionNormal));
1133 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(1)); 1133 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(1));
1134 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setFillMode(blink::WebCo mpositorAnimation::FillModeNone)); 1134 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setFillMode(WebComposito rAnimation::FillModeNone));
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);
(...skipping 26 matching lines...) Expand all
1171 1171
1172 // Create animation 1172 // Create animation
1173 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc k(WebCompositorAnimation::TargetPropertyOpacity); 1173 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc k(WebCompositorAnimation::TargetPropertyOpacity);
1174 ExpectationSet usesMockAnimation; 1174 ExpectationSet usesMockAnimation;
1175 1175
1176 usesMockCurve += EXPECT_CALL(mockCompositor, createAnimation(Ref(*mockCurveP tr), WebCompositorAnimation::TargetPropertyOpacity, _, _)) 1176 usesMockCurve += EXPECT_CALL(mockCompositor, createAnimation(Ref(*mockCurveP tr), WebCompositorAnimation::TargetPropertyOpacity, _, _))
1177 .WillOnce(Return(mockAnimationPtr)); 1177 .WillOnce(Return(mockAnimationPtr));
1178 1178
1179 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(1)); 1179 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(1));
1180 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(0.0)); 1180 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(0.0));
1181 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(blink::WebC ompositorAnimation::DirectionNormal)); 1181 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(WebComposit orAnimation::DirectionNormal));
1182 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(1)); 1182 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(1));
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!
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « Source/core/animation/CompositorAnimations.cpp ('k') | Source/core/animation/Keyframe.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698