Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Side by Side Diff: Source/core/animation/CompositorAnimationsTestHelper.h

Issue 652593003: Web Animations: Plumb compositor group id through animation creation and start/finish notifications (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Pass groupId to createAnimation. Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/animation/CompositorAnimationsTest.cpp ('k') | Source/core/frame/PinchViewport.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
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
OLDNEW
« no previous file with comments | « Source/core/animation/CompositorAnimationsTest.cpp ('k') | Source/core/frame/PinchViewport.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698