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

Unified Diff: cc/animation/element_animations_unittest.cc

Issue 2527623002: add has_element_in_any_list check in ElementAnimations::UpdateActivation (Closed)
Patch Set: update check condition Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/animation/element_animations.cc ('k') | cc/test/animation_timelines_test_common.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..412e52b355406f59f8522ff240368a3451e1e62c 100644
--- a/cc/animation/element_animations_unittest.cc
+++ b/cc/animation/element_animations_unittest.cc
@@ -3633,5 +3633,23 @@ TEST_F(ElementAnimationsTest, TestIsAnimatingPropertyTimeOffsetFillMode) {
ElementListType::ACTIVE));
}
+TEST_F(ElementAnimationsTest, DestroyTestMainLayerBeforePushProperties) {
+ 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());
+
+ DestroyTestMainLayer();
+ EXPECT_EQ(0u, host_->active_element_animations_for_testing().size());
+
+ PushProperties();
+ EXPECT_EQ(0u, host_->active_element_animations_for_testing().size());
+ EXPECT_EQ(0u, host_impl_->active_element_animations_for_testing().size());
+}
+
} // namespace
} // namespace cc
« no previous file with comments | « cc/animation/element_animations.cc ('k') | cc/test/animation_timelines_test_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698