| Index: cc/animation/layer_animation_controller_unittest.cc
|
| diff --git a/cc/animation/layer_animation_controller_unittest.cc b/cc/animation/layer_animation_controller_unittest.cc
|
| index f47b0cf8ebd3f2862ad1caf6d0084db09a703021..5d23e99960891f0c63474771bcc23fe511f26ba8 100644
|
| --- a/cc/animation/layer_animation_controller_unittest.cc
|
| +++ b/cc/animation/layer_animation_controller_unittest.cc
|
| @@ -1045,15 +1045,24 @@ class FakeAnimationDelegate : public AnimationDelegate {
|
| finished_ = true;
|
| }
|
|
|
| + void NotifyAnimationAborted(TimeTicks monotonic_time,
|
| + Animation::TargetProperty target_property,
|
| + int group) override {
|
| + aborted_ = true;
|
| + }
|
| +
|
| bool started() { return started_; }
|
|
|
| bool finished() { return finished_; }
|
|
|
| + bool aborted() { return aborted_; }
|
| +
|
| TimeTicks start_time() { return start_time_; }
|
|
|
| private:
|
| bool started_;
|
| bool finished_;
|
| + bool aborted_;
|
| TimeTicks start_time_;
|
| };
|
|
|
| @@ -1868,6 +1877,8 @@ TEST(LayerAnimationControllerTest, ImplThreadAbortedAnimationGetsDeleted) {
|
| scoped_refptr<LayerAnimationController> controller(
|
| LayerAnimationController::Create(0));
|
| controller->AddValueObserver(&dummy);
|
| + FakeAnimationDelegate delegate;
|
| + controller->set_layer_animation_delegate(&delegate);
|
|
|
| int animation_id =
|
| AddOpacityTransitionToController(controller.get(), 1.0, 0.f, 1.f, false);
|
| @@ -1894,6 +1905,7 @@ TEST(LayerAnimationControllerTest, ImplThreadAbortedAnimationGetsDeleted) {
|
| controller->NotifyAnimationAborted(events[0]);
|
| EXPECT_EQ(Animation::ABORTED,
|
| controller->GetAnimation(Animation::OPACITY)->run_state());
|
| + EXPECT_TRUE(delegate.aborted());
|
|
|
| controller->Animate(kInitialTickTime + TimeDelta::FromMilliseconds(500));
|
| controller->UpdateState(true, nullptr);
|
|
|