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

Side by Side Diff: cc/animation/layer_animation_controller_unittest.cc

Issue 653563003: cc: Plumb group id through animation creation and start/finish notifications (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months 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/layer_animation_controller.cc ('k') | cc/blink/web_animation_impl.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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/layer_animation_controller.h" 5 #include "cc/animation/layer_animation_controller.h"
6 6
7 #include "cc/animation/animation.h" 7 #include "cc/animation/animation.h"
8 #include "cc/animation/animation_curve.h" 8 #include "cc/animation/animation_curve.h"
9 #include "cc/animation/animation_delegate.h" 9 #include "cc/animation/animation_delegate.h"
10 #include "cc/animation/animation_registrar.h" 10 #include "cc/animation/animation_registrar.h"
(...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after
858 event = GetMostRecentPropertyUpdateEvent(events.get()); 858 event = GetMostRecentPropertyUpdateEvent(events.get());
859 EXPECT_FALSE(event); 859 EXPECT_FALSE(event);
860 } 860 }
861 861
862 class FakeAnimationDelegate : public AnimationDelegate { 862 class FakeAnimationDelegate : public AnimationDelegate {
863 public: 863 public:
864 FakeAnimationDelegate() 864 FakeAnimationDelegate()
865 : started_(false), 865 : started_(false),
866 finished_(false) {} 866 finished_(false) {}
867 867
868 virtual void NotifyAnimationStarted( 868 virtual void NotifyAnimationStarted(TimeTicks monotonic_time,
869 TimeTicks monotonic_time, 869 Animation::TargetProperty target_property,
870 Animation::TargetProperty target_property) override { 870 int group) override {
871 started_ = true; 871 started_ = true;
872 } 872 }
873 873
874 virtual void NotifyAnimationFinished( 874 virtual void NotifyAnimationFinished(
875 TimeTicks monotonic_time, 875 TimeTicks monotonic_time,
876 Animation::TargetProperty target_property) override { 876 Animation::TargetProperty target_property,
877 int group) override {
877 finished_ = true; 878 finished_ = true;
878 } 879 }
879 880
880 bool started() { return started_; } 881 bool started() { return started_; }
881 882
882 bool finished() { return finished_; } 883 bool finished() { return finished_; }
883 884
884 private: 885 private:
885 bool started_; 886 bool started_;
886 bool finished_; 887 bool finished_;
(...skipping 1434 matching lines...) Expand 10 before | Expand all | Expand 10 after
2321 // been ticked at the new animation's starting point. 2322 // been ticked at the new animation's starting point.
2322 EXPECT_EQ(Animation::Running, 2323 EXPECT_EQ(Animation::Running,
2323 controller_impl->GetAnimation(second_animation_group_id, 2324 controller_impl->GetAnimation(second_animation_group_id,
2324 Animation::Opacity)->run_state()); 2325 Animation::Opacity)->run_state());
2325 EXPECT_EQ(1.f, pending_dummy_impl.opacity()); 2326 EXPECT_EQ(1.f, pending_dummy_impl.opacity());
2326 EXPECT_EQ(1.f, dummy_impl.opacity()); 2327 EXPECT_EQ(1.f, dummy_impl.opacity());
2327 } 2328 }
2328 2329
2329 } // namespace 2330 } // namespace
2330 } // namespace cc 2331 } // namespace cc
OLDNEW
« no previous file with comments | « cc/animation/layer_animation_controller.cc ('k') | cc/blink/web_animation_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698