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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 MOCK_METHOD0(delete_, void()); | 101 MOCK_METHOD0(delete_, void()); |
102 ~WebCompositorAnimationMock() { delete_(); } | 102 ~WebCompositorAnimationMock() { delete_(); } |
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 | 112 |
112 MOCK_CONST_METHOD1_T(getValue, float(double)); // Only on WebFloatAnimationC
urve, but can't hurt to have here. | 113 MOCK_CONST_METHOD1_T(getValue, float(double)); // Only on WebFloatAnimationC
urve, but can't hurt to have here. |
113 | 114 |
114 virtual WebCompositorAnimationCurve::AnimationCurveType type() const { retur
n CurveId; }; | 115 virtual WebCompositorAnimationCurve::AnimationCurveType type() const { retur
n CurveId; }; |
115 | 116 |
116 MOCK_METHOD0(delete_, void()); | 117 MOCK_METHOD0(delete_, void()); |
117 ~WebCompositorAnimationCurveMock() { delete_(); } | 118 ~WebCompositorAnimationCurveMock() { delete_(); } |
118 }; | 119 }; |
119 | 120 |
120 using WebFloatAnimationCurveMock = WebCompositorAnimationCurveMock<WebFloatAnima
tionCurve, WebCompositorAnimationCurve::AnimationCurveTypeFloat, WebFloatKeyfram
e>; | 121 using WebFloatAnimationCurveMock = WebCompositorAnimationCurveMock<WebFloatAnima
tionCurve, WebCompositorAnimationCurve::AnimationCurveTypeFloat, WebFloatKeyfram
e>; |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 void setCompositorForTesting(WebCompositorSupportMock& mock) | 166 void setCompositorForTesting(WebCompositorSupportMock& mock) |
166 { | 167 { |
167 ASSERT(!m_mockCompositor); | 168 ASSERT(!m_mockCompositor); |
168 m_mockCompositor = &mock; | 169 m_mockCompositor = &mock; |
169 } | 170 } |
170 }; | 171 }; |
171 | 172 |
172 } | 173 } |
173 | 174 |
174 #endif | 175 #endif |
OLD | NEW |