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

Unified Diff: cc/trees/layer_tree_host_unittest_animation_timelines.cc

Issue 1409393005: CC Animations: Fix draw properties invalidation on LAC destruction (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 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/layers/layer_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_unittest_animation_timelines.cc
diff --git a/cc/trees/layer_tree_host_unittest_animation_timelines.cc b/cc/trees/layer_tree_host_unittest_animation_timelines.cc
index da0c6ef56148d592db651d921fc9997a85a9e799..c95a5ca1a8af104b4c1a0c408f6ab1bee407a14e 100644
--- a/cc/trees/layer_tree_host_unittest_animation_timelines.cc
+++ b/cc/trees/layer_tree_host_unittest_animation_timelines.cc
@@ -1000,7 +1000,7 @@ MULTI_THREAD_TEST_F(LayerTreeHostTimelinesTestAnimationFinishesDuringCommit);
// Check that SetTransformIsPotentiallyAnimatingChanged is called
// if we destroy LayerAnimationController and ElementAnimations.
-class DISABLED_LayerTreeHostTimelinesTestSetPotentiallyAnimatingOnLacDestruction
+class LayerTreeHostTimelinesTestSetPotentiallyAnimatingOnLacDestruction
: public LayerTreeHostTimelinesTest {
public:
void SetupTree() override {
@@ -1013,23 +1013,30 @@ class DISABLED_LayerTreeHostTimelinesTestSetPotentiallyAnimatingOnLacDestruction
void BeginTest() override { PostSetNeedsCommitToMainThread(); }
void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override {
- if (host_impl->active_tree()->source_frame_number() == 2) {
+ if (host_impl->active_tree()->source_frame_number() == 1) {
EXPECT_TRUE(host_impl->active_tree());
EXPECT_TRUE(host_impl->active_tree()->root_layer());
EXPECT_TRUE(host_impl->pending_tree());
EXPECT_TRUE(host_impl->pending_tree()->root_layer());
+ EXPECT_EQ(2, host_impl->pending_tree()->source_frame_number());
+
EXPECT_TRUE(host_impl->active_tree()
->root_layer()
->screen_space_transform_is_animating());
EXPECT_FALSE(host_impl->pending_tree()
->root_layer()
->screen_space_transform_is_animating());
+ } else if (host_impl->active_tree()->source_frame_number() == 2) {
+ EXPECT_FALSE(host_impl->active_tree()
+ ->root_layer()
+ ->screen_space_transform_is_animating());
+ EXPECT_FALSE(host_impl->pending_tree()
+ ->root_layer()
+ ->screen_space_transform_is_animating());
}
}
- void WillCommit() override {}
-
void DidCommit() override { PostSetNeedsCommitToMainThread(); }
void UpdateLayerTreeHost() override {
@@ -1049,7 +1056,7 @@ class DISABLED_LayerTreeHostTimelinesTestSetPotentiallyAnimatingOnLacDestruction
};
MULTI_THREAD_TEST_F(
- DISABLED_LayerTreeHostTimelinesTestSetPotentiallyAnimatingOnLacDestruction);
+ LayerTreeHostTimelinesTestSetPotentiallyAnimatingOnLacDestruction);
// Check that we invalidate property trees on AnimationPlayer::SetNeedsCommit.
class LayerTreeHostTimelinesTestRebuildPropertyTreesOnAnimationSetNeedsCommit
« no previous file with comments | « cc/layers/layer_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698