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

Side by Side 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 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/animation/element_animations.cc ('k') | cc/test/animation_timelines_test_common.h » ('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 #include "cc/animation/element_animations.h" 5 #include "cc/animation/element_animations.h"
6 6
7 #include "cc/animation/animation_delegate.h" 7 #include "cc/animation/animation_delegate.h"
8 #include "cc/animation/animation_events.h" 8 #include "cc/animation/animation_events.h"
9 #include "cc/animation/animation_host.h" 9 #include "cc/animation/animation_host.h"
10 #include "cc/animation/animation_id_provider.h" 10 #include "cc/animation/animation_id_provider.h"
(...skipping 3615 matching lines...) Expand 10 before | Expand all | Expand 10 after
3626 EXPECT_FALSE(player_->IsPotentiallyAnimatingProperty( 3626 EXPECT_FALSE(player_->IsPotentiallyAnimatingProperty(
3627 TargetProperty::OPACITY, ElementListType::PENDING)); 3627 TargetProperty::OPACITY, ElementListType::PENDING));
3628 EXPECT_FALSE(player_->IsPotentiallyAnimatingProperty( 3628 EXPECT_FALSE(player_->IsPotentiallyAnimatingProperty(
3629 TargetProperty::OPACITY, ElementListType::ACTIVE)); 3629 TargetProperty::OPACITY, ElementListType::ACTIVE));
3630 EXPECT_FALSE(player_->IsCurrentlyAnimatingProperty(TargetProperty::OPACITY, 3630 EXPECT_FALSE(player_->IsCurrentlyAnimatingProperty(TargetProperty::OPACITY,
3631 ElementListType::PENDING)); 3631 ElementListType::PENDING));
3632 EXPECT_FALSE(player_->IsCurrentlyAnimatingProperty(TargetProperty::OPACITY, 3632 EXPECT_FALSE(player_->IsCurrentlyAnimatingProperty(TargetProperty::OPACITY,
3633 ElementListType::ACTIVE)); 3633 ElementListType::ACTIVE));
3634 } 3634 }
3635 3635
3636 TEST_F(ElementAnimationsTest, DestroyTestMainLayerBeforePushProperties) {
3637 CreateTestLayer(false, false);
3638 AttachTimelinePlayerLayer();
3639 EXPECT_EQ(0u, host_->active_element_animations_for_testing().size());
3640
3641 player_->AddAnimation(CreateAnimation(
3642 std::unique_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 1.f, 0.5f)),
3643 2, TargetProperty::OPACITY));
3644 EXPECT_EQ(1u, host_->active_element_animations_for_testing().size());
3645
3646 DestroyTestMainLayer();
3647 EXPECT_EQ(0u, host_->active_element_animations_for_testing().size());
3648
3649 PushProperties();
3650 EXPECT_EQ(0u, host_->active_element_animations_for_testing().size());
3651 EXPECT_EQ(0u, host_impl_->active_element_animations_for_testing().size());
3652 }
3653
3636 } // namespace 3654 } // namespace
3637 } // namespace cc 3655 } // namespace cc
OLDNEW
« 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