Chromium Code Reviews| Index: cc/animation/element_animations_unittest.cc |
| diff --git a/cc/animation/element_animations_unittest.cc b/cc/animation/element_animations_unittest.cc |
| index d494e72655ce3c924849f6861c75a72f4c7016bb..eec01eb62eb1cdce23aa81a90a8be4e9f69f6254 100644 |
| --- a/cc/animation/element_animations_unittest.cc |
| +++ b/cc/animation/element_animations_unittest.cc |
| @@ -3633,5 +3633,26 @@ TEST_F(ElementAnimationsTest, TestIsAnimatingPropertyTimeOffsetFillMode) { |
| ElementListType::ACTIVE)); |
| } |
| +TEST_F(ElementAnimationsTest, UnregisterElementBeforePushProperties) { |
| + CreateTestLayer(false, false); |
| + AttachTimelinePlayerLayer(); |
| + EXPECT_EQ(0u, host_->active_element_animations_for_testing().size()); |
| + |
| + player_->AddAnimation(CreateAnimation( |
| + std::unique_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 1.f, 0.5f)), |
| + 2, TargetProperty::OPACITY)); |
| + EXPECT_EQ(1u, host_->active_element_animations_for_testing().size()); |
| + |
| + host_->UnregisterElement(element_id_, ElementListType::ACTIVE); |
|
loyso (OOO)
2016/11/28 00:05:53
Please, introduce
void AnimationTimelinesTest::Des
junchao.han
2016/11/28 04:09:03
Done.
|
| + EXPECT_EQ(0u, host_->active_element_animations_for_testing().size()); |
| + |
| + PushProperties(); |
| + EXPECT_EQ(0u, host_->active_element_animations_for_testing().size()); |
| + EXPECT_EQ(1u, host_impl_->active_element_animations_for_testing().size()); |
|
loyso (OOO)
2016/11/27 23:38:53
This should be 0 since we don't have any impl-side
junchao.han
2016/11/28 04:09:03
Done.
|
| + |
| + host_impl_->AnimateLayers(kInitialTickTime); |
| + EXPECT_EQ(0u, host_impl_->active_element_animations_for_testing().size()); |
| +} |
| + |
| } // namespace |
| } // namespace cc |