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

Unified Diff: ui/views/animation/test/test_ink_drop_ripple_observer.cc

Issue 2615613003: Fix double ripple on activated flood fill ripple (Closed)
Patch Set: Added tests Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: ui/views/animation/test/test_ink_drop_ripple_observer.cc
diff --git a/ui/views/animation/test/test_ink_drop_ripple_observer.cc b/ui/views/animation/test/test_ink_drop_ripple_observer.cc
index f6b6747f0e14bc31765048f1f20fe2781d9afe0d..da1cb6e66f3f7a53357e965e6906486258b7590e 100644
--- a/ui/views/animation/test/test_ink_drop_ripple_observer.cc
+++ b/ui/views/animation/test/test_ink_drop_ripple_observer.cc
@@ -15,8 +15,23 @@ TestInkDropRippleObserver::TestInkDropRippleObserver()
TestInkDropRippleObserver::~TestInkDropRippleObserver() {}
+std::vector<InkDropState>
+TestInkDropRippleObserver::GetAndResetAnimationStartedStates() {
+ std::vector<InkDropState> started_states;
+ started_states.swap(animation_started_states_);
+ return started_states;
+}
+
+std::vector<InkDropState>
+TestInkDropRippleObserver::GetAndResetAnimationEndedStates() {
+ std::vector<InkDropState> ended_states;
+ ended_states.swap(animation_ended_states_);
+ return ended_states;
+}
+
void TestInkDropRippleObserver::AnimationStarted(InkDropState ink_drop_state) {
ObserverHelper::OnAnimationStarted(ink_drop_state);
+ animation_started_states_.push_back(ink_drop_state);
if (ink_drop_ripple_) {
target_state_at_last_animation_started_ =
ink_drop_ripple_->target_ink_drop_state();
@@ -27,6 +42,7 @@ void TestInkDropRippleObserver::AnimationEnded(
InkDropState ink_drop_state,
InkDropAnimationEndedReason reason) {
ObserverHelper::OnAnimationEnded(ink_drop_state, reason);
+ animation_ended_states_.push_back(ink_drop_state);
if (ink_drop_ripple_) {
target_state_at_last_animation_ended_ =
ink_drop_ripple_->target_ink_drop_state();

Powered by Google App Engine
This is Rietveld 408576698