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

Side by Side Diff: ui/views/animation/ink_drop_ripple_unittest.cc

Issue 2615613003: Fix double ripple on activated flood fill ripple (Closed)
Patch Set: Addressed nits 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 unified diff | Download patch
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 "ui/views/animation/ink_drop_ripple.h" 5 #include "ui/views/animation/ink_drop_ripple.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 351
352 ink_drop_ripple_->AnimateToState(views::InkDropState::HIDDEN); 352 ink_drop_ripple_->AnimateToState(views::InkDropState::HIDDEN);
353 353
354 test_api_->CompleteAnimations(); 354 test_api_->CompleteAnimations();
355 355
356 EXPECT_TRUE(observer_.AnimationHasEnded()); 356 EXPECT_TRUE(observer_.AnimationHasEnded());
357 EXPECT_EQ(views::InkDropState::HIDDEN, 357 EXPECT_EQ(views::InkDropState::HIDDEN,
358 observer_.target_state_at_last_animation_ended()); 358 observer_.target_state_at_last_animation_ended());
359 } 359 }
360 360
361 // Verifies that when an we ink drop transitions from ACTION_PENDING to
362 // ACTIVATED state, animation observers are called in order.
363 TEST_P(InkDropRippleTest, RipplePendingToActivatedObserverOrder) {
364 ink_drop_ripple_->AnimateToState(InkDropState::ACTION_PENDING);
365 ink_drop_ripple_->AnimateToState(InkDropState::ACTIVATED);
366 test_api_->CompleteAnimations();
367
368 EXPECT_TRUE(observer_.AnimationStartedContextsMatch(
369 {InkDropState::ACTION_PENDING, InkDropState::ACTIVATED}));
370 EXPECT_TRUE(observer_.AnimationEndedContextsMatch(
371 {InkDropState::ACTION_PENDING, InkDropState::ACTIVATED}));
372 }
373
361 } // namespace test 374 } // namespace test
362 } // namespace views 375 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/animation/ink_drop_ripple.cc ('k') | ui/views/animation/test/flood_fill_ink_drop_ripple_test_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698