| 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 class WebCompositorAnimationMock : public WebCompositorAnimation { | 68 class WebCompositorAnimationMock : public WebCompositorAnimation { |
| 69 private: | 69 private: |
| 70 WebCompositorAnimation::TargetProperty m_property; | 70 WebCompositorAnimation::TargetProperty m_property; |
| 71 | 71 |
| 72 public: | 72 public: |
| 73 // Target Property is set through the constructor. | 73 // Target Property is set through the constructor. |
| 74 WebCompositorAnimationMock(WebCompositorAnimation::TargetProperty p) : m_pro
perty(p) { } | 74 WebCompositorAnimationMock(WebCompositorAnimation::TargetProperty p) : m_pro
perty(p) { } |
| 75 virtual WebCompositorAnimation::TargetProperty targetProperty() const { retu
rn m_property; }; | 75 virtual WebCompositorAnimation::TargetProperty targetProperty() const { retu
rn m_property; }; |
| 76 | 76 |
| 77 MOCK_METHOD0(id, int()); | 77 MOCK_METHOD0(id, int()); |
| 78 MOCK_METHOD0(group, int()); |
| 78 | 79 |
| 79 MOCK_CONST_METHOD0(iterations, double()); | 80 MOCK_CONST_METHOD0(iterations, double()); |
| 80 MOCK_METHOD1(setIterations, void(double)); | 81 MOCK_METHOD1(setIterations, void(double)); |
| 81 | 82 |
| 82 MOCK_CONST_METHOD0(iterationStart, double()); | 83 MOCK_CONST_METHOD0(iterationStart, double()); |
| 83 MOCK_METHOD1(setIterationStart, void(double)); | 84 MOCK_METHOD1(setIterationStart, void(double)); |
| 84 | 85 |
| 85 MOCK_CONST_METHOD0(startTime, double()); | 86 MOCK_CONST_METHOD0(startTime, double()); |
| 86 MOCK_METHOD1(setStartTime, void(double)); | 87 MOCK_METHOD1(setStartTime, void(double)); |
| 87 | 88 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 } // namespace blink | 122 } // namespace blink |
| 122 | 123 |
| 123 namespace blink { | 124 namespace blink { |
| 124 | 125 |
| 125 class AnimationCompositorAnimationsTestBase : public ::testing::Test { | 126 class AnimationCompositorAnimationsTestBase : public ::testing::Test { |
| 126 public: | 127 public: |
| 127 AnimationCompositorAnimationsTestBase() : m_proxyPlatform(&m_mockCompositor)
{ }; | 128 AnimationCompositorAnimationsTestBase() : m_proxyPlatform(&m_mockCompositor)
{ }; |
| 128 | 129 |
| 129 class WebCompositorSupportMock : public WebCompositorSupport { | 130 class WebCompositorSupportMock : public WebCompositorSupport { |
| 130 public: | 131 public: |
| 131 MOCK_METHOD3(createAnimation, WebCompositorAnimation*(const WebComposito
rAnimationCurve& curve, WebCompositorAnimation::TargetProperty target, int anima
tionId)); | 132 MOCK_METHOD4(createAnimation, WebCompositorAnimation*(const WebComposito
rAnimationCurve& curve, WebCompositorAnimation::TargetProperty target, int group
Id, int animationId)); |
| 132 MOCK_METHOD0(createFloatAnimationCurve, WebFloatAnimationCurve*()); | 133 MOCK_METHOD0(createFloatAnimationCurve, WebFloatAnimationCurve*()); |
| 133 }; | 134 }; |
| 134 | 135 |
| 135 private: | 136 private: |
| 136 class PlatformProxy : public Platform { | 137 class PlatformProxy : public Platform { |
| 137 public: | 138 public: |
| 138 PlatformProxy(WebCompositorSupportMock** compositor) : m_compositor(comp
ositor) { } | 139 PlatformProxy(WebCompositorSupportMock** compositor) : m_compositor(comp
ositor) { } |
| 139 | 140 |
| 140 virtual void cryptographicallyRandomValues(unsigned char* buffer, size_t
length) { ASSERT_NOT_REACHED(); } | 141 virtual void cryptographicallyRandomValues(unsigned char* buffer, size_t
length) { ASSERT_NOT_REACHED(); } |
| 141 private: | 142 private: |
| (...skipping 22 matching lines...) Expand all Loading... |
| 164 void setCompositorForTesting(WebCompositorSupportMock& mock) | 165 void setCompositorForTesting(WebCompositorSupportMock& mock) |
| 165 { | 166 { |
| 166 ASSERT(!m_mockCompositor); | 167 ASSERT(!m_mockCompositor); |
| 167 m_mockCompositor = &mock; | 168 m_mockCompositor = &mock; |
| 168 } | 169 } |
| 169 }; | 170 }; |
| 170 | 171 |
| 171 } | 172 } |
| 172 | 173 |
| 173 #endif | 174 #endif |
| OLD | NEW |