OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 }; | 103 }; |
104 | 104 |
105 template<typename CurveType, WebCompositorAnimationCurve::AnimationCurveType Cur
veId, typename KeyframeType> | 105 template<typename CurveType, WebCompositorAnimationCurve::AnimationCurveType Cur
veId, typename KeyframeType> |
106 class WebCompositorAnimationCurveMock : public CurveType { | 106 class WebCompositorAnimationCurveMock : public CurveType { |
107 public: | 107 public: |
108 MOCK_METHOD1_T(add, void(const KeyframeType&)); | 108 MOCK_METHOD1_T(add, void(const KeyframeType&)); |
109 MOCK_METHOD2_T(add, void(const KeyframeType&, WebCompositorAnimationCurve::T
imingFunctionType)); | 109 MOCK_METHOD2_T(add, void(const KeyframeType&, WebCompositorAnimationCurve::T
imingFunctionType)); |
110 MOCK_METHOD5_T(add, void(const KeyframeType&, double, double, double, double
)); | 110 MOCK_METHOD5_T(add, void(const KeyframeType&, double, double, double, double
)); |
111 MOCK_METHOD3_T(add, void(const KeyframeType&, int steps, float stepsStartOff
set)); | 111 MOCK_METHOD3_T(add, void(const KeyframeType&, int steps, float stepsStartOff
set)); |
112 | 112 |
| 113 MOCK_METHOD0(setLinearTimingFunction, void()); |
| 114 MOCK_METHOD4(setCubicBezierTimingFunction, void(double, double, double, doub
le)); |
| 115 MOCK_METHOD1(setCubicBezierTimingFunction, void(WebCompositorAnimationCurve:
:TimingFunctionType)); |
| 116 MOCK_METHOD2(setStepsTimingFunction, void(int, float)); |
| 117 |
113 MOCK_CONST_METHOD1_T(getValue, float(double)); // Only on WebFloatAnimationC
urve, but can't hurt to have here. | 118 MOCK_CONST_METHOD1_T(getValue, float(double)); // Only on WebFloatAnimationC
urve, but can't hurt to have here. |
114 | 119 |
115 virtual WebCompositorAnimationCurve::AnimationCurveType type() const { retur
n CurveId; }; | 120 virtual WebCompositorAnimationCurve::AnimationCurveType type() const { retur
n CurveId; }; |
116 | 121 |
117 MOCK_METHOD0(delete_, void()); | 122 MOCK_METHOD0(delete_, void()); |
118 ~WebCompositorAnimationCurveMock() { delete_(); } | 123 ~WebCompositorAnimationCurveMock() { delete_(); } |
119 }; | 124 }; |
120 | 125 |
121 using WebFloatAnimationCurveMock = WebCompositorAnimationCurveMock<WebFloatAnima
tionCurve, WebCompositorAnimationCurve::AnimationCurveTypeFloat, WebFloatKeyfram
e>; | 126 using WebFloatAnimationCurveMock = WebCompositorAnimationCurveMock<WebFloatAnima
tionCurve, WebCompositorAnimationCurve::AnimationCurveTypeFloat, WebFloatKeyfram
e>; |
122 | 127 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 void setCompositorForTesting(WebCompositorSupportMock& mock) | 171 void setCompositorForTesting(WebCompositorSupportMock& mock) |
167 { | 172 { |
168 ASSERT(!m_mockCompositor); | 173 ASSERT(!m_mockCompositor); |
169 m_mockCompositor = &mock; | 174 m_mockCompositor = &mock; |
170 } | 175 } |
171 }; | 176 }; |
172 | 177 |
173 } | 178 } |
174 | 179 |
175 #endif | 180 #endif |
OLD | NEW |