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

Side by Side Diff: cc/test/animation_timelines_test_common.h

Issue 2377223002: CC Animations: Rewrite unit tests to work with AnimationPlayer. (Closed)
Patch Set: Reparent. Created 4 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
« no previous file with comments | « cc/test/animation_test_common.cc ('k') | cc/test/animation_timelines_test_common.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_TEST_ANIMATION_TIMELINES_TEST_COMMON_H_ 5 #ifndef CC_TEST_ANIMATION_TIMELINES_TEST_COMMON_H_
6 #define CC_TEST_ANIMATION_TIMELINES_TEST_COMMON_H_ 6 #define CC_TEST_ANIMATION_TIMELINES_TEST_COMMON_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <unordered_map> 9 #include <unordered_map>
10 10
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 void GetImplTimelineAndPlayerByID(); 235 void GetImplTimelineAndPlayerByID();
236 236
237 void CreateTestLayer(bool needs_active_value_observations, 237 void CreateTestLayer(bool needs_active_value_observations,
238 bool needs_pending_value_observations); 238 bool needs_pending_value_observations);
239 void AttachTimelinePlayerLayer(); 239 void AttachTimelinePlayerLayer();
240 void CreateImplTimelineAndPlayer(); 240 void CreateImplTimelineAndPlayer();
241 241
242 void CreateTestMainLayer(); 242 void CreateTestMainLayer();
243 void CreateTestImplLayer(ElementListType element_list_type); 243 void CreateTestImplLayer(ElementListType element_list_type);
244 244
245 scoped_refptr<ElementAnimations> element_animations() const;
246 scoped_refptr<ElementAnimations> element_animations_impl() const;
247
248 void ReleaseRefPtrs(); 245 void ReleaseRefPtrs();
249 246
250 void AnimateLayersTransferEvents(base::TimeTicks time, 247 void AnimateLayersTransferEvents(base::TimeTicks time,
251 unsigned expect_events); 248 unsigned expect_events);
252 249
253 AnimationPlayer* GetPlayerForElementId(ElementId element_id); 250 AnimationPlayer* GetPlayerForElementId(ElementId element_id);
254 AnimationPlayer* GetImplPlayerForLayerId(ElementId element_id); 251 AnimationPlayer* GetImplPlayerForLayerId(ElementId element_id);
255 252
256 int NextTestLayerId(); 253 int NextTestLayerId();
257 254
258 bool CheckPlayerTimelineNeedsPushProperties(bool needs_push_properties) const; 255 bool CheckPlayerTimelineNeedsPushProperties(bool needs_push_properties) const;
259 256
260 void PushProperties(); 257 void PushProperties();
261 258
262 TestHostClient client_; 259 TestHostClient client_;
263 TestHostClient client_impl_; 260 TestHostClient client_impl_;
264 261
265 AnimationHost* host_; 262 AnimationHost* host_;
266 AnimationHost* host_impl_; 263 AnimationHost* host_impl_;
267 264
268 const int timeline_id_; 265 const int timeline_id_;
269 const int player_id_; 266 const int player_id_;
270 ElementId element_id_; 267 ElementId element_id_;
271 268
272 int next_test_layer_id_; 269 int next_test_layer_id_;
273 270
274 scoped_refptr<AnimationTimeline> timeline_; 271 scoped_refptr<AnimationTimeline> timeline_;
275 scoped_refptr<AnimationPlayer> player_; 272 scoped_refptr<AnimationPlayer> player_;
273 scoped_refptr<ElementAnimations> element_animations_;
276 274
277 scoped_refptr<AnimationTimeline> timeline_impl_; 275 scoped_refptr<AnimationTimeline> timeline_impl_;
278 scoped_refptr<AnimationPlayer> player_impl_; 276 scoped_refptr<AnimationPlayer> player_impl_;
277 scoped_refptr<ElementAnimations> element_animations_impl_;
279 }; 278 };
280 279
281 } // namespace cc 280 } // namespace cc
282 281
283 #endif // CC_TEST_ANIMATION_TIMELINES_TEST_COMMON_H_ 282 #endif // CC_TEST_ANIMATION_TIMELINES_TEST_COMMON_H_
OLDNEW
« no previous file with comments | « cc/test/animation_test_common.cc ('k') | cc/test/animation_timelines_test_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698