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 594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
605 EXPECT_CALL(mockCompositor, createFloatAnimationCurve()) | 605 EXPECT_CALL(mockCompositor, createFloatAnimationCurve()) |
606 .WillOnce(Return(mockCurvePtr)); | 606 .WillOnce(Return(mockCurvePtr)); |
607 | 607 |
608 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(WebFloatKeyframe(0.0, 2.0),
WebCompositorAnimationCurve::TimingFunctionTypeLinear)); | 608 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(WebFloatKeyframe(0.0, 2.0),
WebCompositorAnimationCurve::TimingFunctionTypeLinear)); |
609 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(WebFloatKeyframe(1.0, 5.0)))
; | 609 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(WebFloatKeyframe(1.0, 5.0)))
; |
610 | 610 |
611 // Create animation | 611 // Create animation |
612 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc
k(WebCompositorAnimation::TargetPropertyOpacity); | 612 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc
k(WebCompositorAnimation::TargetPropertyOpacity); |
613 ExpectationSet usesMockAnimation; | 613 ExpectationSet usesMockAnimation; |
614 | 614 |
615 usesMockCurve += EXPECT_CALL(mockCompositor, createAnimation(Ref(*mockCurveP
tr), WebCompositorAnimation::TargetPropertyOpacity, _)) | 615 usesMockCurve += EXPECT_CALL(mockCompositor, createAnimation(Ref(*mockCurveP
tr), WebCompositorAnimation::TargetPropertyOpacity, _, _)) |
616 .WillOnce(Return(mockAnimationPtr)); | 616 .WillOnce(Return(mockAnimationPtr)); |
617 | 617 |
618 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(1)); | 618 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(1)); |
619 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(0.0)); | 619 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(0.0)); |
620 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(blink::WebC
ompositorAnimation::DirectionNormal)); | 620 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(blink::WebC
ompositorAnimation::DirectionNormal)); |
621 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(1)); | 621 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(1)); |
622 | 622 |
623 EXPECT_CALL(*mockAnimationPtr, delete_()) | 623 EXPECT_CALL(*mockAnimationPtr, delete_()) |
624 .Times(1) | 624 .Times(1) |
625 .After(usesMockAnimation); | 625 .After(usesMockAnimation); |
(...skipping 27 matching lines...) Expand all Loading... |
653 EXPECT_CALL(mockCompositor, createFloatAnimationCurve()) | 653 EXPECT_CALL(mockCompositor, createFloatAnimationCurve()) |
654 .WillOnce(Return(mockCurvePtr)); | 654 .WillOnce(Return(mockCurvePtr)); |
655 | 655 |
656 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(WebFloatKeyframe(0.0, 2.0),
WebCompositorAnimationCurve::TimingFunctionTypeLinear)); | 656 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(WebFloatKeyframe(0.0, 2.0),
WebCompositorAnimationCurve::TimingFunctionTypeLinear)); |
657 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(WebFloatKeyframe(10.0, 5.0))
); | 657 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(WebFloatKeyframe(10.0, 5.0))
); |
658 | 658 |
659 // Create animation | 659 // Create animation |
660 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc
k(WebCompositorAnimation::TargetPropertyOpacity); | 660 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc
k(WebCompositorAnimation::TargetPropertyOpacity); |
661 ExpectationSet usesMockAnimation; | 661 ExpectationSet usesMockAnimation; |
662 | 662 |
663 usesMockCurve += EXPECT_CALL(mockCompositor, createAnimation(Ref(*mockCurveP
tr), WebCompositorAnimation::TargetPropertyOpacity, _)) | 663 usesMockCurve += EXPECT_CALL(mockCompositor, createAnimation(Ref(*mockCurveP
tr), WebCompositorAnimation::TargetPropertyOpacity, _, _)) |
664 .WillOnce(Return(mockAnimationPtr)); | 664 .WillOnce(Return(mockAnimationPtr)); |
665 | 665 |
666 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(1)); | 666 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(1)); |
667 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(0.0)); | 667 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(0.0)); |
668 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(blink::WebC
ompositorAnimation::DirectionNormal)); | 668 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(blink::WebC
ompositorAnimation::DirectionNormal)); |
669 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(1)); | 669 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(1)); |
670 | 670 |
671 EXPECT_CALL(*mockAnimationPtr, delete_()) | 671 EXPECT_CALL(*mockAnimationPtr, delete_()) |
672 .Times(1) | 672 .Times(1) |
673 .After(usesMockAnimation); | 673 .After(usesMockAnimation); |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
708 | 708 |
709 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(WebFloatKeyframe(0.0, 2.0),
WebCompositorAnimationCurve::TimingFunctionTypeLinear)); | 709 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(WebFloatKeyframe(0.0, 2.0),
WebCompositorAnimationCurve::TimingFunctionTypeLinear)); |
710 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(WebFloatKeyframe(0.25, -1.0)
, WebCompositorAnimationCurve::TimingFunctionTypeLinear)); | 710 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(WebFloatKeyframe(0.25, -1.0)
, WebCompositorAnimationCurve::TimingFunctionTypeLinear)); |
711 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(WebFloatKeyframe(0.5, 20.0),
WebCompositorAnimationCurve::TimingFunctionTypeLinear)); | 711 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(WebFloatKeyframe(0.5, 20.0),
WebCompositorAnimationCurve::TimingFunctionTypeLinear)); |
712 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(WebFloatKeyframe(1.0, 5.0)))
; | 712 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(WebFloatKeyframe(1.0, 5.0)))
; |
713 | 713 |
714 // Animation is created | 714 // Animation is created |
715 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc
k(WebCompositorAnimation::TargetPropertyOpacity); | 715 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc
k(WebCompositorAnimation::TargetPropertyOpacity); |
716 ExpectationSet usesMockAnimation; | 716 ExpectationSet usesMockAnimation; |
717 | 717 |
718 usesMockCurve += EXPECT_CALL(mockCompositor, createAnimation(Ref(*mockCurveP
tr), WebCompositorAnimation::TargetPropertyOpacity, _)) | 718 usesMockCurve += EXPECT_CALL(mockCompositor, createAnimation(Ref(*mockCurveP
tr), WebCompositorAnimation::TargetPropertyOpacity, _, _)) |
719 .WillOnce(Return(mockAnimationPtr)); | 719 .WillOnce(Return(mockAnimationPtr)); |
720 | 720 |
721 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(5)); | 721 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(5)); |
722 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(0.0)); | 722 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(0.0)); |
723 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(blink::WebC
ompositorAnimation::DirectionAlternate)); | 723 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(blink::WebC
ompositorAnimation::DirectionAlternate)); |
724 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(2.0)); | 724 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(2.0)); |
725 | 725 |
726 EXPECT_CALL(*mockAnimationPtr, delete_()) | 726 EXPECT_CALL(*mockAnimationPtr, delete_()) |
727 .Times(1) | 727 .Times(1) |
728 .After(usesMockAnimation); | 728 .After(usesMockAnimation); |
(...skipping 29 matching lines...) Expand all Loading... |
758 EXPECT_CALL(mockCompositor, createFloatAnimationCurve()) | 758 EXPECT_CALL(mockCompositor, createFloatAnimationCurve()) |
759 .WillOnce(Return(mockCurvePtr)); | 759 .WillOnce(Return(mockCurvePtr)); |
760 | 760 |
761 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(WebFloatKeyframe(0.0, 2.0),
WebCompositorAnimationCurve::TimingFunctionTypeLinear)); | 761 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(WebFloatKeyframe(0.0, 2.0),
WebCompositorAnimationCurve::TimingFunctionTypeLinear)); |
762 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(WebFloatKeyframe(1.75, 5.0))
); | 762 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(WebFloatKeyframe(1.75, 5.0))
); |
763 | 763 |
764 // Create animation | 764 // Create animation |
765 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc
k(WebCompositorAnimation::TargetPropertyOpacity); | 765 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc
k(WebCompositorAnimation::TargetPropertyOpacity); |
766 ExpectationSet usesMockAnimation; | 766 ExpectationSet usesMockAnimation; |
767 | 767 |
768 usesMockCurve += EXPECT_CALL(mockCompositor, createAnimation(Ref(*mockCurveP
tr), WebCompositorAnimation::TargetPropertyOpacity, _)) | 768 usesMockCurve += EXPECT_CALL(mockCompositor, createAnimation(Ref(*mockCurveP
tr), WebCompositorAnimation::TargetPropertyOpacity, _, _)) |
769 .WillOnce(Return(mockAnimationPtr)); | 769 .WillOnce(Return(mockAnimationPtr)); |
770 | 770 |
771 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(5)); | 771 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(5)); |
772 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(-3.25)); | 772 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(-3.25)); |
773 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(blink::WebC
ompositorAnimation::DirectionNormal)); | 773 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(blink::WebC
ompositorAnimation::DirectionNormal)); |
774 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(1)); | 774 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(1)); |
775 | 775 |
776 EXPECT_CALL(*mockAnimationPtr, delete_()) | 776 EXPECT_CALL(*mockAnimationPtr, delete_()) |
777 .Times(1) | 777 .Times(1) |
778 .After(usesMockAnimation); | 778 .After(usesMockAnimation); |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
818 | 818 |
819 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(WebFloatKeyframe(0.0, 2.0),
WebCompositorAnimationCurve::TimingFunctionTypeEase)); | 819 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(WebFloatKeyframe(0.0, 2.0),
WebCompositorAnimationCurve::TimingFunctionTypeEase)); |
820 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(WebFloatKeyframe(0.5, -1.0),
WebCompositorAnimationCurve::TimingFunctionTypeLinear)); | 820 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(WebFloatKeyframe(0.5, -1.0),
WebCompositorAnimationCurve::TimingFunctionTypeLinear)); |
821 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(WebFloatKeyframe(1.0, 20.0),
1.0, 2.0, 3.0, 4.0)); | 821 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(WebFloatKeyframe(1.0, 20.0),
1.0, 2.0, 3.0, 4.0)); |
822 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(WebFloatKeyframe(2.0, 5.0)))
; | 822 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(WebFloatKeyframe(2.0, 5.0)))
; |
823 | 823 |
824 // Animation is created | 824 // Animation is created |
825 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc
k(WebCompositorAnimation::TargetPropertyOpacity); | 825 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc
k(WebCompositorAnimation::TargetPropertyOpacity); |
826 ExpectationSet usesMockAnimation; | 826 ExpectationSet usesMockAnimation; |
827 | 827 |
828 usesMockCurve += EXPECT_CALL(mockCompositor, createAnimation(Ref(*mockCurveP
tr), WebCompositorAnimation::TargetPropertyOpacity, _)) | 828 usesMockCurve += EXPECT_CALL(mockCompositor, createAnimation(Ref(*mockCurveP
tr), WebCompositorAnimation::TargetPropertyOpacity, _, _)) |
829 .WillOnce(Return(mockAnimationPtr)); | 829 .WillOnce(Return(mockAnimationPtr)); |
830 | 830 |
831 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(10)); | 831 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(10)); |
832 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(0.0)); | 832 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(0.0)); |
833 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(blink::WebC
ompositorAnimation::DirectionAlternate)); | 833 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(blink::WebC
ompositorAnimation::DirectionAlternate)); |
834 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(1)); | 834 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(1)); |
835 | 835 |
836 EXPECT_CALL(*mockAnimationPtr, delete_()) | 836 EXPECT_CALL(*mockAnimationPtr, delete_()) |
837 .Times(1) | 837 .Times(1) |
838 .After(usesMockAnimation); | 838 .After(usesMockAnimation); |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
879 | 879 |
880 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(blink::WebFloatKeyframe(0.0,
2.0), blink::WebCompositorAnimationCurve::TimingFunctionTypeEaseIn)); | 880 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(blink::WebFloatKeyframe(0.0,
2.0), blink::WebCompositorAnimationCurve::TimingFunctionTypeEaseIn)); |
881 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(blink::WebFloatKeyframe(0.25
, -1.0), blink::WebCompositorAnimationCurve::TimingFunctionTypeLinear)); | 881 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(blink::WebFloatKeyframe(0.25
, -1.0), blink::WebCompositorAnimationCurve::TimingFunctionTypeLinear)); |
882 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(blink::WebFloatKeyframe(0.5,
20.0), 0.0, 0.0, 0.0, 1.0)); | 882 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(blink::WebFloatKeyframe(0.5,
20.0), 0.0, 0.0, 0.0, 1.0)); |
883 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(blink::WebFloatKeyframe(1.0,
5.0))); | 883 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(blink::WebFloatKeyframe(1.0,
5.0))); |
884 | 884 |
885 // Create the animation | 885 // Create the animation |
886 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc
k(WebCompositorAnimation::TargetPropertyOpacity); | 886 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc
k(WebCompositorAnimation::TargetPropertyOpacity); |
887 ExpectationSet usesMockAnimation; | 887 ExpectationSet usesMockAnimation; |
888 | 888 |
889 usesMockCurve += EXPECT_CALL(mockCompositor, createAnimation(Ref(*mockCurveP
tr), WebCompositorAnimation::TargetPropertyOpacity, _)) | 889 usesMockCurve += EXPECT_CALL(mockCompositor, createAnimation(Ref(*mockCurveP
tr), WebCompositorAnimation::TargetPropertyOpacity, _, _)) |
890 .WillOnce(Return(mockAnimationPtr)); | 890 .WillOnce(Return(mockAnimationPtr)); |
891 | 891 |
892 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(10)); | 892 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(10)); |
893 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(0.0)); | 893 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(0.0)); |
894 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(blink::WebC
ompositorAnimation::DirectionAlternateReverse)); | 894 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(blink::WebC
ompositorAnimation::DirectionAlternateReverse)); |
895 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(1)); | 895 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(1)); |
896 | 896 |
897 EXPECT_CALL(*mockAnimationPtr, delete_()) | 897 EXPECT_CALL(*mockAnimationPtr, delete_()) |
898 .Times(1) | 898 .Times(1) |
899 .After(usesMockAnimation); | 899 .After(usesMockAnimation); |
(...skipping 30 matching lines...) Expand all Loading... |
930 EXPECT_CALL(mockCompositor, createFloatAnimationCurve()) | 930 EXPECT_CALL(mockCompositor, createFloatAnimationCurve()) |
931 .WillOnce(Return(mockCurvePtr)); | 931 .WillOnce(Return(mockCurvePtr)); |
932 | 932 |
933 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(blink::WebFloatKeyframe(0.0,
2.0), blink::WebCompositorAnimationCurve::TimingFunctionTypeLinear)); | 933 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(blink::WebFloatKeyframe(0.0,
2.0), blink::WebCompositorAnimationCurve::TimingFunctionTypeLinear)); |
934 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(blink::WebFloatKeyframe(1.5,
5.0))); | 934 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(blink::WebFloatKeyframe(1.5,
5.0))); |
935 | 935 |
936 // Create animation | 936 // Create animation |
937 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc
k(WebCompositorAnimation::TargetPropertyOpacity); | 937 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc
k(WebCompositorAnimation::TargetPropertyOpacity); |
938 ExpectationSet usesMockAnimation; | 938 ExpectationSet usesMockAnimation; |
939 | 939 |
940 usesMockCurve += EXPECT_CALL(mockCompositor, createAnimation(Ref(*mockCurveP
tr), WebCompositorAnimation::TargetPropertyOpacity, _)) | 940 usesMockCurve += EXPECT_CALL(mockCompositor, createAnimation(Ref(*mockCurveP
tr), WebCompositorAnimation::TargetPropertyOpacity, _, _)) |
941 .WillOnce(Return(mockAnimationPtr)); | 941 .WillOnce(Return(mockAnimationPtr)); |
942 | 942 |
943 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(5)); | 943 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(5)); |
944 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(3.0)); | 944 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(3.0)); |
945 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(blink::WebC
ompositorAnimation::DirectionAlternateReverse)); | 945 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(blink::WebC
ompositorAnimation::DirectionAlternateReverse)); |
946 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(1)); | 946 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(1)); |
947 | 947 |
948 EXPECT_CALL(*mockAnimationPtr, delete_()) | 948 EXPECT_CALL(*mockAnimationPtr, delete_()) |
949 .Times(1) | 949 .Times(1) |
950 .After(usesMockAnimation); | 950 .After(usesMockAnimation); |
(...skipping 27 matching lines...) Expand all Loading... |
978 EXPECT_CALL(mockCompositor, createFloatAnimationCurve()) | 978 EXPECT_CALL(mockCompositor, createFloatAnimationCurve()) |
979 .WillOnce(Return(mockCurvePtr)); | 979 .WillOnce(Return(mockCurvePtr)); |
980 | 980 |
981 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(WebFloatKeyframe(0.0, 2.0),
WebCompositorAnimationCurve::TimingFunctionTypeLinear)); | 981 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(WebFloatKeyframe(0.0, 2.0),
WebCompositorAnimationCurve::TimingFunctionTypeLinear)); |
982 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(WebFloatKeyframe(1.0, 5.0)))
; | 982 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(WebFloatKeyframe(1.0, 5.0)))
; |
983 | 983 |
984 // Create animation | 984 // Create animation |
985 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc
k(WebCompositorAnimation::TargetPropertyOpacity); | 985 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc
k(WebCompositorAnimation::TargetPropertyOpacity); |
986 ExpectationSet usesMockAnimation; | 986 ExpectationSet usesMockAnimation; |
987 | 987 |
988 usesMockCurve += EXPECT_CALL(mockCompositor, createAnimation(Ref(*mockCurveP
tr), WebCompositorAnimation::TargetPropertyOpacity, _)) | 988 usesMockCurve += EXPECT_CALL(mockCompositor, createAnimation(Ref(*mockCurveP
tr), WebCompositorAnimation::TargetPropertyOpacity, _, _)) |
989 .WillOnce(Return(mockAnimationPtr)); | 989 .WillOnce(Return(mockAnimationPtr)); |
990 | 990 |
991 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(1)); | 991 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(1)); |
992 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(0.0)); | 992 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(0.0)); |
993 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(blink::WebC
ompositorAnimation::DirectionNormal)); | 993 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(blink::WebC
ompositorAnimation::DirectionNormal)); |
994 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(-3)); | 994 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(-3)); |
995 | 995 |
996 EXPECT_CALL(*mockAnimationPtr, delete_()) | 996 EXPECT_CALL(*mockAnimationPtr, delete_()) |
997 .Times(1) | 997 .Times(1) |
998 .After(usesMockAnimation); | 998 .After(usesMockAnimation); |
(...skipping 27 matching lines...) Expand all Loading... |
1026 EXPECT_CALL(mockCompositor, createFloatAnimationCurve()) | 1026 EXPECT_CALL(mockCompositor, createFloatAnimationCurve()) |
1027 .WillOnce(Return(mockCurvePtr)); | 1027 .WillOnce(Return(mockCurvePtr)); |
1028 | 1028 |
1029 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(WebFloatKeyframe(0.0, 2.0),
WebCompositorAnimationCurve::TimingFunctionTypeLinear)); | 1029 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(WebFloatKeyframe(0.0, 2.0),
WebCompositorAnimationCurve::TimingFunctionTypeLinear)); |
1030 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(WebFloatKeyframe(1.0, 5.0)))
; | 1030 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(WebFloatKeyframe(1.0, 5.0)))
; |
1031 | 1031 |
1032 // Create animation | 1032 // Create animation |
1033 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc
k(WebCompositorAnimation::TargetPropertyOpacity); | 1033 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc
k(WebCompositorAnimation::TargetPropertyOpacity); |
1034 ExpectationSet usesMockAnimation; | 1034 ExpectationSet usesMockAnimation; |
1035 | 1035 |
1036 usesMockCurve += EXPECT_CALL(mockCompositor, createAnimation(Ref(*mockCurveP
tr), WebCompositorAnimation::TargetPropertyOpacity, _)) | 1036 usesMockCurve += EXPECT_CALL(mockCompositor, createAnimation(Ref(*mockCurveP
tr), WebCompositorAnimation::TargetPropertyOpacity, _, _)) |
1037 .WillOnce(Return(mockAnimationPtr)); | 1037 .WillOnce(Return(mockAnimationPtr)); |
1038 | 1038 |
1039 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(1)); | 1039 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(1)); |
1040 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(0.0)); | 1040 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(0.0)); |
1041 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(blink::WebC
ompositorAnimation::DirectionNormal)); | 1041 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(blink::WebC
ompositorAnimation::DirectionNormal)); |
1042 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(1)); | 1042 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(1)); |
1043 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setFillMode(blink::WebCo
mpositorAnimation::FillModeNone)); | 1043 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setFillMode(blink::WebCo
mpositorAnimation::FillModeNone)); |
1044 | 1044 |
1045 EXPECT_CALL(*mockAnimationPtr, delete_()) | 1045 EXPECT_CALL(*mockAnimationPtr, delete_()) |
1046 .Times(1) | 1046 .Times(1) |
(...skipping 27 matching lines...) Expand all Loading... |
1074 EXPECT_CALL(mockCompositor, createFloatAnimationCurve()) | 1074 EXPECT_CALL(mockCompositor, createFloatAnimationCurve()) |
1075 .WillOnce(Return(mockCurvePtr)); | 1075 .WillOnce(Return(mockCurvePtr)); |
1076 | 1076 |
1077 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(WebFloatKeyframe(0.0, 2.0),
WebCompositorAnimationCurve::TimingFunctionTypeLinear)); | 1077 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(WebFloatKeyframe(0.0, 2.0),
WebCompositorAnimationCurve::TimingFunctionTypeLinear)); |
1078 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(WebFloatKeyframe(1.0, 5.0)))
; | 1078 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(WebFloatKeyframe(1.0, 5.0)))
; |
1079 | 1079 |
1080 // Create animation | 1080 // Create animation |
1081 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc
k(WebCompositorAnimation::TargetPropertyOpacity); | 1081 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc
k(WebCompositorAnimation::TargetPropertyOpacity); |
1082 ExpectationSet usesMockAnimation; | 1082 ExpectationSet usesMockAnimation; |
1083 | 1083 |
1084 usesMockCurve += EXPECT_CALL(mockCompositor, createAnimation(Ref(*mockCurveP
tr), WebCompositorAnimation::TargetPropertyOpacity, _)) | 1084 usesMockCurve += EXPECT_CALL(mockCompositor, createAnimation(Ref(*mockCurveP
tr), WebCompositorAnimation::TargetPropertyOpacity, _, _)) |
1085 .WillOnce(Return(mockAnimationPtr)); | 1085 .WillOnce(Return(mockAnimationPtr)); |
1086 | 1086 |
1087 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(1)); | 1087 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(1)); |
1088 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(0.0)); | 1088 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(0.0)); |
1089 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(blink::WebC
ompositorAnimation::DirectionNormal)); | 1089 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(blink::WebC
ompositorAnimation::DirectionNormal)); |
1090 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(1)); | 1090 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(1)); |
1091 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setFillMode(blink::WebCo
mpositorAnimation::FillModeNone)); | 1091 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setFillMode(blink::WebCo
mpositorAnimation::FillModeNone)); |
1092 | 1092 |
1093 EXPECT_CALL(*mockAnimationPtr, delete_()) | 1093 EXPECT_CALL(*mockAnimationPtr, delete_()) |
1094 .Times(1) | 1094 .Times(1) |
1095 .After(usesMockAnimation); | 1095 .After(usesMockAnimation); |
1096 EXPECT_CALL(*mockCurvePtr, delete_()) | 1096 EXPECT_CALL(*mockCurvePtr, delete_()) |
1097 .Times(1) | 1097 .Times(1) |
1098 .After(usesMockCurve); | 1098 .After(usesMockCurve); |
1099 | 1099 |
1100 // Go! | 1100 // Go! |
1101 setCompositorForTesting(mockCompositor); | 1101 setCompositorForTesting(mockCompositor); |
1102 Vector<OwnPtr<WebCompositorAnimation> > result; | 1102 Vector<OwnPtr<WebCompositorAnimation> > result; |
1103 getAnimationOnCompositor(m_timing, *effect.get(), result); | 1103 getAnimationOnCompositor(m_timing, *effect.get(), result); |
1104 EXPECT_EQ(1U, result.size()); | 1104 EXPECT_EQ(1U, result.size()); |
1105 result[0].clear(); | 1105 result[0].clear(); |
1106 } | 1106 } |
1107 | 1107 |
1108 } // namespace blink | 1108 } // namespace blink |
OLD | NEW |