OLD | NEW |
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 #include "cc/test/animation_timelines_test_common.h" | 5 #include "cc/test/animation_timelines_test_common.h" |
6 | 6 |
7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
8 #include "cc/animation/animation_events.h" | 8 #include "cc/animation/animation_events.h" |
9 #include "cc/animation/animation_id_provider.h" | 9 #include "cc/animation/animation_id_provider.h" |
10 #include "cc/animation/animation_player.h" | 10 #include "cc/animation/animation_player.h" |
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
511 &element_animations->players_list()) | 511 &element_animations->players_list()) |
512 .GetNext() | 512 .GetNext() |
513 : nullptr; | 513 : nullptr; |
514 } | 514 } |
515 | 515 |
516 int AnimationTimelinesTest::NextTestLayerId() { | 516 int AnimationTimelinesTest::NextTestLayerId() { |
517 next_test_layer_id_++; | 517 next_test_layer_id_++; |
518 return next_test_layer_id_; | 518 return next_test_layer_id_; |
519 } | 519 } |
520 | 520 |
| 521 bool AnimationTimelinesTest::CheckPlayerTimelineNeedsPushProperties( |
| 522 bool needs_push_properties) const { |
| 523 DCHECK(player_); |
| 524 DCHECK(timeline_); |
| 525 |
| 526 bool result = true; |
| 527 |
| 528 if (player_->needs_push_properties() != needs_push_properties) { |
| 529 ADD_FAILURE() << "player_->needs_push_properties() expected to be " |
| 530 << needs_push_properties; |
| 531 result = false; |
| 532 } |
| 533 if (timeline_->needs_push_properties() != needs_push_properties) { |
| 534 ADD_FAILURE() << "timeline_->needs_push_properties() expected to be " |
| 535 << needs_push_properties; |
| 536 result = false; |
| 537 } |
| 538 if (player_->element_animations() && |
| 539 player_->element_animations()->needs_push_properties() != |
| 540 needs_push_properties) { |
| 541 ADD_FAILURE() << "player_->element_animations()->needs_push_properties() " |
| 542 "expected to be " |
| 543 << needs_push_properties; |
| 544 result = false; |
| 545 } |
| 546 |
| 547 return result; |
| 548 } |
| 549 |
521 } // namespace cc | 550 } // namespace cc |
OLD | NEW |