| 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 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 662 // Curve is created | 662 // Curve is created |
| 663 WebFloatAnimationCurveMock* mockCurvePtr = new WebFloatAnimationCurveMock; | 663 WebFloatAnimationCurveMock* mockCurvePtr = new WebFloatAnimationCurveMock; |
| 664 ExpectationSet usesMockCurve; | 664 ExpectationSet usesMockCurve; |
| 665 EXPECT_CALL(*m_mockCompositorFactory, createFloatAnimationCurve()) | 665 EXPECT_CALL(*m_mockCompositorFactory, createFloatAnimationCurve()) |
| 666 .WillOnce(Return(mockCurvePtr)); | 666 .WillOnce(Return(mockCurvePtr)); |
| 667 | 667 |
| 668 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(0.0,
2.0), CompositorAnimationCurve::TimingFunctionTypeLinear)); | 668 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(0.0,
2.0), CompositorAnimationCurve::TimingFunctionTypeLinear)); |
| 669 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(1.0,
5.0))); | 669 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(1.0,
5.0))); |
| 670 | 670 |
| 671 // Create animation | 671 // Create animation |
| 672 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc
k(CompositorAnimation::TargetPropertyOpacity); | 672 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc
k(CompositorTargetProperty::OPACITY); |
| 673 ExpectationSet usesMockAnimation; | 673 ExpectationSet usesMockAnimation; |
| 674 | 674 |
| 675 usesMockCurve += EXPECT_CALL(*m_mockCompositorFactory, createAnimation(Ref(*
mockCurvePtr), CompositorAnimation::TargetPropertyOpacity, _, _)) | 675 usesMockCurve += EXPECT_CALL(*m_mockCompositorFactory, createAnimation(Ref(*
mockCurvePtr), CompositorTargetProperty::OPACITY, _, _)) |
| 676 .WillOnce(Return(mockAnimationPtr)); | 676 .WillOnce(Return(mockAnimationPtr)); |
| 677 | 677 |
| 678 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(1)); | 678 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(1)); |
| 679 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(0.0)); | 679 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(0.0)); |
| 680 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(CompositorA
nimation::DirectionNormal)); | 680 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(CompositorA
nimation::DirectionNormal)); |
| 681 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(1)); | 681 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(1)); |
| 682 | 682 |
| 683 EXPECT_CALL(*mockAnimationPtr, delete_()) | 683 EXPECT_CALL(*mockAnimationPtr, delete_()) |
| 684 .Times(1) | 684 .Times(1) |
| 685 .After(usesMockAnimation); | 685 .After(usesMockAnimation); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 707 // Curve is created | 707 // Curve is created |
| 708 WebFloatAnimationCurveMock* mockCurvePtr = new WebFloatAnimationCurveMock; | 708 WebFloatAnimationCurveMock* mockCurvePtr = new WebFloatAnimationCurveMock; |
| 709 ExpectationSet usesMockCurve; | 709 ExpectationSet usesMockCurve; |
| 710 EXPECT_CALL(*m_mockCompositorFactory, createFloatAnimationCurve()) | 710 EXPECT_CALL(*m_mockCompositorFactory, createFloatAnimationCurve()) |
| 711 .WillOnce(Return(mockCurvePtr)); | 711 .WillOnce(Return(mockCurvePtr)); |
| 712 | 712 |
| 713 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(0.0,
2.0), CompositorAnimationCurve::TimingFunctionTypeLinear)); | 713 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(0.0,
2.0), CompositorAnimationCurve::TimingFunctionTypeLinear)); |
| 714 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(10.0
, 5.0))); | 714 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(10.0
, 5.0))); |
| 715 | 715 |
| 716 // Create animation | 716 // Create animation |
| 717 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc
k(CompositorAnimation::TargetPropertyOpacity); | 717 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc
k(CompositorTargetProperty::OPACITY); |
| 718 ExpectationSet usesMockAnimation; | 718 ExpectationSet usesMockAnimation; |
| 719 | 719 |
| 720 usesMockCurve += EXPECT_CALL(*m_mockCompositorFactory, createAnimation(Ref(*
mockCurvePtr), CompositorAnimation::TargetPropertyOpacity, _, _)) | 720 usesMockCurve += EXPECT_CALL(*m_mockCompositorFactory, createAnimation(Ref(*
mockCurvePtr), CompositorTargetProperty::OPACITY, _, _)) |
| 721 .WillOnce(Return(mockAnimationPtr)); | 721 .WillOnce(Return(mockAnimationPtr)); |
| 722 | 722 |
| 723 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(1)); | 723 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(1)); |
| 724 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(0.0)); | 724 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(0.0)); |
| 725 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(CompositorA
nimation::DirectionNormal)); | 725 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(CompositorA
nimation::DirectionNormal)); |
| 726 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(1)); | 726 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(1)); |
| 727 | 727 |
| 728 EXPECT_CALL(*mockAnimationPtr, delete_()) | 728 EXPECT_CALL(*mockAnimationPtr, delete_()) |
| 729 .Times(1) | 729 .Times(1) |
| 730 .After(usesMockAnimation); | 730 .After(usesMockAnimation); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 759 | 759 |
| 760 EXPECT_CALL(*m_mockCompositorFactory, createFloatAnimationCurve()) | 760 EXPECT_CALL(*m_mockCompositorFactory, createFloatAnimationCurve()) |
| 761 .WillOnce(Return(mockCurvePtr)); | 761 .WillOnce(Return(mockCurvePtr)); |
| 762 | 762 |
| 763 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(0.0,
2.0), CompositorAnimationCurve::TimingFunctionTypeLinear)); | 763 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(0.0,
2.0), CompositorAnimationCurve::TimingFunctionTypeLinear)); |
| 764 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(0.25
, -1.0), CompositorAnimationCurve::TimingFunctionTypeLinear)); | 764 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(0.25
, -1.0), CompositorAnimationCurve::TimingFunctionTypeLinear)); |
| 765 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(0.5,
20.0), CompositorAnimationCurve::TimingFunctionTypeLinear)); | 765 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(0.5,
20.0), CompositorAnimationCurve::TimingFunctionTypeLinear)); |
| 766 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(1.0,
5.0))); | 766 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(1.0,
5.0))); |
| 767 | 767 |
| 768 // KeyframeEffect is created | 768 // KeyframeEffect is created |
| 769 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc
k(CompositorAnimation::TargetPropertyOpacity); | 769 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc
k(CompositorTargetProperty::OPACITY); |
| 770 ExpectationSet usesMockAnimation; | 770 ExpectationSet usesMockAnimation; |
| 771 | 771 |
| 772 usesMockCurve += EXPECT_CALL(*m_mockCompositorFactory, createAnimation(Ref(*
mockCurvePtr), CompositorAnimation::TargetPropertyOpacity, _, _)) | 772 usesMockCurve += EXPECT_CALL(*m_mockCompositorFactory, createAnimation(Ref(*
mockCurvePtr), CompositorTargetProperty::OPACITY, _, _)) |
| 773 .WillOnce(Return(mockAnimationPtr)); | 773 .WillOnce(Return(mockAnimationPtr)); |
| 774 | 774 |
| 775 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(5)); | 775 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(5)); |
| 776 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(0.0)); | 776 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(0.0)); |
| 777 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(CompositorA
nimation::DirectionAlternate)); | 777 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(CompositorA
nimation::DirectionAlternate)); |
| 778 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(2.0)); | 778 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(2.0)); |
| 779 | 779 |
| 780 EXPECT_CALL(*mockAnimationPtr, delete_()) | 780 EXPECT_CALL(*mockAnimationPtr, delete_()) |
| 781 .Times(1) | 781 .Times(1) |
| 782 .After(usesMockAnimation); | 782 .After(usesMockAnimation); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 806 // Curve is created | 806 // Curve is created |
| 807 WebFloatAnimationCurveMock* mockCurvePtr = new WebFloatAnimationCurveMock; | 807 WebFloatAnimationCurveMock* mockCurvePtr = new WebFloatAnimationCurveMock; |
| 808 ExpectationSet usesMockCurve; | 808 ExpectationSet usesMockCurve; |
| 809 EXPECT_CALL(*m_mockCompositorFactory, createFloatAnimationCurve()) | 809 EXPECT_CALL(*m_mockCompositorFactory, createFloatAnimationCurve()) |
| 810 .WillOnce(Return(mockCurvePtr)); | 810 .WillOnce(Return(mockCurvePtr)); |
| 811 | 811 |
| 812 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(0.0,
2.0), CompositorAnimationCurve::TimingFunctionTypeLinear)); | 812 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(0.0,
2.0), CompositorAnimationCurve::TimingFunctionTypeLinear)); |
| 813 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(1.75
, 5.0))); | 813 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(1.75
, 5.0))); |
| 814 | 814 |
| 815 // Create animation | 815 // Create animation |
| 816 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc
k(CompositorAnimation::TargetPropertyOpacity); | 816 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc
k(CompositorTargetProperty::OPACITY); |
| 817 ExpectationSet usesMockAnimation; | 817 ExpectationSet usesMockAnimation; |
| 818 | 818 |
| 819 usesMockCurve += EXPECT_CALL(*m_mockCompositorFactory, createAnimation(Ref(*
mockCurvePtr), CompositorAnimation::TargetPropertyOpacity, _, _)) | 819 usesMockCurve += EXPECT_CALL(*m_mockCompositorFactory, createAnimation(Ref(*
mockCurvePtr), CompositorTargetProperty::OPACITY, _, _)) |
| 820 .WillOnce(Return(mockAnimationPtr)); | 820 .WillOnce(Return(mockAnimationPtr)); |
| 821 | 821 |
| 822 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(5)); | 822 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(5)); |
| 823 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(-3.25)); | 823 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(-3.25)); |
| 824 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(CompositorA
nimation::DirectionNormal)); | 824 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(CompositorA
nimation::DirectionNormal)); |
| 825 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(1)); | 825 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(1)); |
| 826 | 826 |
| 827 EXPECT_CALL(*mockAnimationPtr, delete_()) | 827 EXPECT_CALL(*mockAnimationPtr, delete_()) |
| 828 .Times(1) | 828 .Times(1) |
| 829 .After(usesMockAnimation); | 829 .After(usesMockAnimation); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 863 | 863 |
| 864 EXPECT_CALL(*m_mockCompositorFactory, createFloatAnimationCurve()) | 864 EXPECT_CALL(*m_mockCompositorFactory, createFloatAnimationCurve()) |
| 865 .WillOnce(Return(mockCurvePtr)); | 865 .WillOnce(Return(mockCurvePtr)); |
| 866 | 866 |
| 867 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(0.0,
2.0), CompositorAnimationCurve::TimingFunctionTypeEase)); | 867 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(0.0,
2.0), CompositorAnimationCurve::TimingFunctionTypeEase)); |
| 868 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(0.5,
-1.0), CompositorAnimationCurve::TimingFunctionTypeLinear)); | 868 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(0.5,
-1.0), CompositorAnimationCurve::TimingFunctionTypeLinear)); |
| 869 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(1.0,
20.0), 1.0, 2.0, 3.0, 4.0)); | 869 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(1.0,
20.0), 1.0, 2.0, 3.0, 4.0)); |
| 870 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(2.0,
5.0))); | 870 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(2.0,
5.0))); |
| 871 | 871 |
| 872 // KeyframeEffect is created | 872 // KeyframeEffect is created |
| 873 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc
k(CompositorAnimation::TargetPropertyOpacity); | 873 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc
k(CompositorTargetProperty::OPACITY); |
| 874 ExpectationSet usesMockAnimation; | 874 ExpectationSet usesMockAnimation; |
| 875 | 875 |
| 876 usesMockCurve += EXPECT_CALL(*m_mockCompositorFactory, createAnimation(Ref(*
mockCurvePtr), CompositorAnimation::TargetPropertyOpacity, _, _)) | 876 usesMockCurve += EXPECT_CALL(*m_mockCompositorFactory, createAnimation(Ref(*
mockCurvePtr), CompositorTargetProperty::OPACITY, _, _)) |
| 877 .WillOnce(Return(mockAnimationPtr)); | 877 .WillOnce(Return(mockAnimationPtr)); |
| 878 | 878 |
| 879 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(10)); | 879 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(10)); |
| 880 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(0.0)); | 880 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(0.0)); |
| 881 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(CompositorA
nimation::DirectionAlternate)); | 881 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(CompositorA
nimation::DirectionAlternate)); |
| 882 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(1)); | 882 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(1)); |
| 883 | 883 |
| 884 EXPECT_CALL(*mockAnimationPtr, delete_()) | 884 EXPECT_CALL(*mockAnimationPtr, delete_()) |
| 885 .Times(1) | 885 .Times(1) |
| 886 .After(usesMockAnimation); | 886 .After(usesMockAnimation); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 921 | 921 |
| 922 EXPECT_CALL(*m_mockCompositorFactory, createFloatAnimationCurve()) | 922 EXPECT_CALL(*m_mockCompositorFactory, createFloatAnimationCurve()) |
| 923 .WillOnce(Return(mockCurvePtr)); | 923 .WillOnce(Return(mockCurvePtr)); |
| 924 | 924 |
| 925 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(0.0,
2.0), CompositorAnimationCurve::TimingFunctionTypeEaseIn)); | 925 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(0.0,
2.0), CompositorAnimationCurve::TimingFunctionTypeEaseIn)); |
| 926 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(0.25
, -1.0), CompositorAnimationCurve::TimingFunctionTypeLinear)); | 926 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(0.25
, -1.0), CompositorAnimationCurve::TimingFunctionTypeLinear)); |
| 927 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(0.5,
20.0), 0.0, 0.0, 0.0, 1.0)); | 927 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(0.5,
20.0), 0.0, 0.0, 0.0, 1.0)); |
| 928 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(1.0,
5.0))); | 928 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(1.0,
5.0))); |
| 929 | 929 |
| 930 // Create the animation | 930 // Create the animation |
| 931 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc
k(CompositorAnimation::TargetPropertyOpacity); | 931 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc
k(CompositorTargetProperty::OPACITY); |
| 932 ExpectationSet usesMockAnimation; | 932 ExpectationSet usesMockAnimation; |
| 933 | 933 |
| 934 usesMockCurve += EXPECT_CALL(*m_mockCompositorFactory, createAnimation(Ref(*
mockCurvePtr), CompositorAnimation::TargetPropertyOpacity, _, _)) | 934 usesMockCurve += EXPECT_CALL(*m_mockCompositorFactory, createAnimation(Ref(*
mockCurvePtr), CompositorTargetProperty::OPACITY, _, _)) |
| 935 .WillOnce(Return(mockAnimationPtr)); | 935 .WillOnce(Return(mockAnimationPtr)); |
| 936 | 936 |
| 937 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(10)); | 937 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(10)); |
| 938 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(0.0)); | 938 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(0.0)); |
| 939 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(CompositorA
nimation::DirectionAlternateReverse)); | 939 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(CompositorA
nimation::DirectionAlternateReverse)); |
| 940 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(1)); | 940 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(1)); |
| 941 | 941 |
| 942 EXPECT_CALL(*mockAnimationPtr, delete_()) | 942 EXPECT_CALL(*mockAnimationPtr, delete_()) |
| 943 .Times(1) | 943 .Times(1) |
| 944 .After(usesMockAnimation); | 944 .After(usesMockAnimation); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 969 // Curve is created | 969 // Curve is created |
| 970 WebFloatAnimationCurveMock* mockCurvePtr = new WebFloatAnimationCurveMock; | 970 WebFloatAnimationCurveMock* mockCurvePtr = new WebFloatAnimationCurveMock; |
| 971 ExpectationSet usesMockCurve; | 971 ExpectationSet usesMockCurve; |
| 972 EXPECT_CALL(*m_mockCompositorFactory, createFloatAnimationCurve()) | 972 EXPECT_CALL(*m_mockCompositorFactory, createFloatAnimationCurve()) |
| 973 .WillOnce(Return(mockCurvePtr)); | 973 .WillOnce(Return(mockCurvePtr)); |
| 974 | 974 |
| 975 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(0.0,
2.0), CompositorAnimationCurve::TimingFunctionTypeLinear)); | 975 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(0.0,
2.0), CompositorAnimationCurve::TimingFunctionTypeLinear)); |
| 976 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(1.5,
5.0))); | 976 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(1.5,
5.0))); |
| 977 | 977 |
| 978 // Create animation | 978 // Create animation |
| 979 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc
k(CompositorAnimation::TargetPropertyOpacity); | 979 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc
k(CompositorTargetProperty::OPACITY); |
| 980 ExpectationSet usesMockAnimation; | 980 ExpectationSet usesMockAnimation; |
| 981 | 981 |
| 982 usesMockCurve += EXPECT_CALL(*m_mockCompositorFactory, createAnimation(Ref(*
mockCurvePtr), CompositorAnimation::TargetPropertyOpacity, _, _)) | 982 usesMockCurve += EXPECT_CALL(*m_mockCompositorFactory, createAnimation(Ref(*
mockCurvePtr), CompositorTargetProperty::OPACITY, _, _)) |
| 983 .WillOnce(Return(mockAnimationPtr)); | 983 .WillOnce(Return(mockAnimationPtr)); |
| 984 | 984 |
| 985 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(5)); | 985 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(5)); |
| 986 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(3.0)); | 986 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(3.0)); |
| 987 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(CompositorA
nimation::DirectionAlternateReverse)); | 987 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(CompositorA
nimation::DirectionAlternateReverse)); |
| 988 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(1)); | 988 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(1)); |
| 989 | 989 |
| 990 EXPECT_CALL(*mockAnimationPtr, delete_()) | 990 EXPECT_CALL(*mockAnimationPtr, delete_()) |
| 991 .Times(1) | 991 .Times(1) |
| 992 .After(usesMockAnimation); | 992 .After(usesMockAnimation); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 1014 // Curve is created | 1014 // Curve is created |
| 1015 WebFloatAnimationCurveMock* mockCurvePtr = new WebFloatAnimationCurveMock; | 1015 WebFloatAnimationCurveMock* mockCurvePtr = new WebFloatAnimationCurveMock; |
| 1016 ExpectationSet usesMockCurve; | 1016 ExpectationSet usesMockCurve; |
| 1017 EXPECT_CALL(*m_mockCompositorFactory, createFloatAnimationCurve()) | 1017 EXPECT_CALL(*m_mockCompositorFactory, createFloatAnimationCurve()) |
| 1018 .WillOnce(Return(mockCurvePtr)); | 1018 .WillOnce(Return(mockCurvePtr)); |
| 1019 | 1019 |
| 1020 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(0.0,
2.0), CompositorAnimationCurve::TimingFunctionTypeLinear)); | 1020 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(0.0,
2.0), CompositorAnimationCurve::TimingFunctionTypeLinear)); |
| 1021 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(1.0,
5.0))); | 1021 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(1.0,
5.0))); |
| 1022 | 1022 |
| 1023 // Create animation | 1023 // Create animation |
| 1024 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc
k(CompositorAnimation::TargetPropertyOpacity); | 1024 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc
k(CompositorTargetProperty::OPACITY); |
| 1025 ExpectationSet usesMockAnimation; | 1025 ExpectationSet usesMockAnimation; |
| 1026 | 1026 |
| 1027 usesMockCurve += EXPECT_CALL(*m_mockCompositorFactory, createAnimation(Ref(*
mockCurvePtr), CompositorAnimation::TargetPropertyOpacity, _, _)) | 1027 usesMockCurve += EXPECT_CALL(*m_mockCompositorFactory, createAnimation(Ref(*
mockCurvePtr), CompositorTargetProperty::OPACITY, _, _)) |
| 1028 .WillOnce(Return(mockAnimationPtr)); | 1028 .WillOnce(Return(mockAnimationPtr)); |
| 1029 | 1029 |
| 1030 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(1)); | 1030 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(1)); |
| 1031 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(0.0)); | 1031 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(0.0)); |
| 1032 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(CompositorA
nimation::DirectionNormal)); | 1032 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(CompositorA
nimation::DirectionNormal)); |
| 1033 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(-3)); | 1033 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(-3)); |
| 1034 | 1034 |
| 1035 EXPECT_CALL(*mockAnimationPtr, delete_()) | 1035 EXPECT_CALL(*mockAnimationPtr, delete_()) |
| 1036 .Times(1) | 1036 .Times(1) |
| 1037 .After(usesMockAnimation); | 1037 .After(usesMockAnimation); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 1059 // Curve is created | 1059 // Curve is created |
| 1060 WebFloatAnimationCurveMock* mockCurvePtr = new WebFloatAnimationCurveMock; | 1060 WebFloatAnimationCurveMock* mockCurvePtr = new WebFloatAnimationCurveMock; |
| 1061 ExpectationSet usesMockCurve; | 1061 ExpectationSet usesMockCurve; |
| 1062 EXPECT_CALL(*m_mockCompositorFactory, createFloatAnimationCurve()) | 1062 EXPECT_CALL(*m_mockCompositorFactory, createFloatAnimationCurve()) |
| 1063 .WillOnce(Return(mockCurvePtr)); | 1063 .WillOnce(Return(mockCurvePtr)); |
| 1064 | 1064 |
| 1065 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(0.0,
2.0), CompositorAnimationCurve::TimingFunctionTypeLinear)); | 1065 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(0.0,
2.0), CompositorAnimationCurve::TimingFunctionTypeLinear)); |
| 1066 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(1.0,
5.0))); | 1066 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(1.0,
5.0))); |
| 1067 | 1067 |
| 1068 // Create animation | 1068 // Create animation |
| 1069 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc
k(CompositorAnimation::TargetPropertyOpacity); | 1069 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc
k(CompositorTargetProperty::OPACITY); |
| 1070 ExpectationSet usesMockAnimation; | 1070 ExpectationSet usesMockAnimation; |
| 1071 | 1071 |
| 1072 usesMockCurve += EXPECT_CALL(*m_mockCompositorFactory, createAnimation(Ref(*
mockCurvePtr), CompositorAnimation::TargetPropertyOpacity, _, _)) | 1072 usesMockCurve += EXPECT_CALL(*m_mockCompositorFactory, createAnimation(Ref(*
mockCurvePtr), CompositorTargetProperty::OPACITY, _, _)) |
| 1073 .WillOnce(Return(mockAnimationPtr)); | 1073 .WillOnce(Return(mockAnimationPtr)); |
| 1074 | 1074 |
| 1075 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(1)); | 1075 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(1)); |
| 1076 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(0.0)); | 1076 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(0.0)); |
| 1077 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(CompositorA
nimation::DirectionNormal)); | 1077 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(CompositorA
nimation::DirectionNormal)); |
| 1078 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(1)); | 1078 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(1)); |
| 1079 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setFillMode(CompositorAn
imation::FillModeNone)); | 1079 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setFillMode(CompositorAn
imation::FillModeNone)); |
| 1080 | 1080 |
| 1081 EXPECT_CALL(*mockAnimationPtr, delete_()) | 1081 EXPECT_CALL(*mockAnimationPtr, delete_()) |
| 1082 .Times(1) | 1082 .Times(1) |
| (...skipping 21 matching lines...) Expand all Loading... |
| 1104 // Curve is created | 1104 // Curve is created |
| 1105 WebFloatAnimationCurveMock* mockCurvePtr = new WebFloatAnimationCurveMock; | 1105 WebFloatAnimationCurveMock* mockCurvePtr = new WebFloatAnimationCurveMock; |
| 1106 ExpectationSet usesMockCurve; | 1106 ExpectationSet usesMockCurve; |
| 1107 EXPECT_CALL(*m_mockCompositorFactory, createFloatAnimationCurve()) | 1107 EXPECT_CALL(*m_mockCompositorFactory, createFloatAnimationCurve()) |
| 1108 .WillOnce(Return(mockCurvePtr)); | 1108 .WillOnce(Return(mockCurvePtr)); |
| 1109 | 1109 |
| 1110 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(0.0,
2.0), CompositorAnimationCurve::TimingFunctionTypeLinear)); | 1110 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(0.0,
2.0), CompositorAnimationCurve::TimingFunctionTypeLinear)); |
| 1111 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(1.0,
5.0))); | 1111 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(1.0,
5.0))); |
| 1112 | 1112 |
| 1113 // Create animation | 1113 // Create animation |
| 1114 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc
k(CompositorAnimation::TargetPropertyOpacity); | 1114 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc
k(CompositorTargetProperty::OPACITY); |
| 1115 ExpectationSet usesMockAnimation; | 1115 ExpectationSet usesMockAnimation; |
| 1116 | 1116 |
| 1117 usesMockCurve += EXPECT_CALL(*m_mockCompositorFactory, createAnimation(Ref(*
mockCurvePtr), CompositorAnimation::TargetPropertyOpacity, _, _)) | 1117 usesMockCurve += EXPECT_CALL(*m_mockCompositorFactory, createAnimation(Ref(*
mockCurvePtr), CompositorTargetProperty::OPACITY, _, _)) |
| 1118 .WillOnce(Return(mockAnimationPtr)); | 1118 .WillOnce(Return(mockAnimationPtr)); |
| 1119 | 1119 |
| 1120 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(1)); | 1120 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(1)); |
| 1121 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(0.0)); | 1121 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(0.0)); |
| 1122 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(CompositorA
nimation::DirectionNormal)); | 1122 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(CompositorA
nimation::DirectionNormal)); |
| 1123 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(1)); | 1123 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(1)); |
| 1124 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setFillMode(CompositorAn
imation::FillModeNone)); | 1124 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setFillMode(CompositorAn
imation::FillModeNone)); |
| 1125 | 1125 |
| 1126 EXPECT_CALL(*mockAnimationPtr, delete_()) | 1126 EXPECT_CALL(*mockAnimationPtr, delete_()) |
| 1127 .Times(1) | 1127 .Times(1) |
| (...skipping 22 matching lines...) Expand all Loading... |
| 1150 WebFloatAnimationCurveMock* mockCurvePtr = new WebFloatAnimationCurveMock; | 1150 WebFloatAnimationCurveMock* mockCurvePtr = new WebFloatAnimationCurveMock; |
| 1151 ExpectationSet usesMockCurve; | 1151 ExpectationSet usesMockCurve; |
| 1152 EXPECT_CALL(*m_mockCompositorFactory, createFloatAnimationCurve()) | 1152 EXPECT_CALL(*m_mockCompositorFactory, createFloatAnimationCurve()) |
| 1153 .WillOnce(Return(mockCurvePtr)); | 1153 .WillOnce(Return(mockCurvePtr)); |
| 1154 | 1154 |
| 1155 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(0.0,
2.0), CompositorAnimationCurve::TimingFunctionTypeLinear)); | 1155 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(0.0,
2.0), CompositorAnimationCurve::TimingFunctionTypeLinear)); |
| 1156 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(1.0,
5.0))); | 1156 usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(1.0,
5.0))); |
| 1157 usesMockCurve += EXPECT_CALL(*mockCurvePtr, setCubicBezierTimingFunction(1,
2, 3, 4)); | 1157 usesMockCurve += EXPECT_CALL(*mockCurvePtr, setCubicBezierTimingFunction(1,
2, 3, 4)); |
| 1158 | 1158 |
| 1159 // Create animation | 1159 // Create animation |
| 1160 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc
k(CompositorAnimation::TargetPropertyOpacity); | 1160 WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMoc
k(CompositorTargetProperty::OPACITY); |
| 1161 ExpectationSet usesMockAnimation; | 1161 ExpectationSet usesMockAnimation; |
| 1162 | 1162 |
| 1163 usesMockCurve += EXPECT_CALL(*m_mockCompositorFactory, createAnimation(Ref(*
mockCurvePtr), CompositorAnimation::TargetPropertyOpacity, _, _)) | 1163 usesMockCurve += EXPECT_CALL(*m_mockCompositorFactory, createAnimation(Ref(*
mockCurvePtr), CompositorTargetProperty::OPACITY, _, _)) |
| 1164 .WillOnce(Return(mockAnimationPtr)); | 1164 .WillOnce(Return(mockAnimationPtr)); |
| 1165 | 1165 |
| 1166 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(1)); | 1166 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(1)); |
| 1167 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(0.0)); | 1167 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setTimeOffset(0.0)); |
| 1168 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(CompositorA
nimation::DirectionNormal)); | 1168 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setDirection(CompositorA
nimation::DirectionNormal)); |
| 1169 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(1)); | 1169 usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setPlaybackRate(1)); |
| 1170 | 1170 |
| 1171 EXPECT_CALL(*mockAnimationPtr, delete_()) | 1171 EXPECT_CALL(*mockAnimationPtr, delete_()) |
| 1172 .Times(1) | 1172 .Times(1) |
| 1173 .After(usesMockAnimation); | 1173 .After(usesMockAnimation); |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1226 simulateFrame(1.); | 1226 simulateFrame(1.); |
| 1227 | 1227 |
| 1228 element->setLayoutObject(nullptr); | 1228 element->setLayoutObject(nullptr); |
| 1229 LayoutObjectProxy::dispose(layoutObject); | 1229 LayoutObjectProxy::dispose(layoutObject); |
| 1230 | 1230 |
| 1231 Heap::collectAllGarbage(); | 1231 Heap::collectAllGarbage(); |
| 1232 EXPECT_TRUE(element->elementAnimations()->animations().isEmpty()); | 1232 EXPECT_TRUE(element->elementAnimations()->animations().isEmpty()); |
| 1233 } | 1233 } |
| 1234 | 1234 |
| 1235 } // namespace blink | 1235 } // namespace blink |
| OLD | NEW |