| OLD | NEW |
| 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 #ifndef UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_UNITTEST_H_ | 5 #ifndef UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_UNITTEST_H_ |
| 6 #define UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_UNITTEST_H_ | 6 #define UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_UNITTEST_H_ |
| 7 | 7 |
| 8 #include "ui/views/animation/ink_drop_animation.h" | 8 #include "ui/views/animation/ink_drop_animation.h" |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 SquareInkDropAnimation* square_ink_drop_animation = | 62 SquareInkDropAnimation* square_ink_drop_animation = |
| 63 new SquareInkDropAnimation(gfx::Size(10, 10), 2, gfx::Size(8, 8), 1, | 63 new SquareInkDropAnimation(gfx::Size(10, 10), 2, gfx::Size(8, 8), 1, |
| 64 gfx::Point(), SK_ColorBLACK); | 64 gfx::Point(), SK_ColorBLACK); |
| 65 ink_drop_animation_.reset(square_ink_drop_animation); | 65 ink_drop_animation_.reset(square_ink_drop_animation); |
| 66 test_api_.reset( | 66 test_api_.reset( |
| 67 new SquareInkDropAnimationTestApi(square_ink_drop_animation)); | 67 new SquareInkDropAnimationTestApi(square_ink_drop_animation)); |
| 68 break; | 68 break; |
| 69 } | 69 } |
| 70 case FLOOD_FILL_INK_DROP_ANIMATION: { | 70 case FLOOD_FILL_INK_DROP_ANIMATION: { |
| 71 FloodFillInkDropAnimation* flood_fill_ink_drop_animation = | 71 FloodFillInkDropAnimation* flood_fill_ink_drop_animation = |
| 72 new FloodFillInkDropAnimation(gfx::Size(10, 10), gfx::Point(), | 72 new FloodFillInkDropAnimation(gfx::Rect(0, 0, 10, 10), gfx::Point(), |
| 73 SK_ColorBLACK); | 73 SK_ColorBLACK); |
| 74 ink_drop_animation_.reset(flood_fill_ink_drop_animation); | 74 ink_drop_animation_.reset(flood_fill_ink_drop_animation); |
| 75 test_api_.reset( | 75 test_api_.reset( |
| 76 new FloodFillInkDropAnimationTestApi(flood_fill_ink_drop_animation)); | 76 new FloodFillInkDropAnimationTestApi(flood_fill_ink_drop_animation)); |
| 77 break; | 77 break; |
| 78 } | 78 } |
| 79 } | 79 } |
| 80 ink_drop_animation_->set_observer(&observer_); | 80 ink_drop_animation_->set_observer(&observer_); |
| 81 observer_.set_ink_drop_animation(ink_drop_animation_.get()); | 81 observer_.set_ink_drop_animation(ink_drop_animation_.get()); |
| 82 test_api_->SetDisableAnimationTimers(true); | 82 test_api_->SetDisableAnimationTimers(true); |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 | 347 |
| 348 EXPECT_EQ(2, observer_.last_animation_ended_ordinal()); | 348 EXPECT_EQ(2, observer_.last_animation_ended_ordinal()); |
| 349 EXPECT_EQ(views::InkDropState::HIDDEN, | 349 EXPECT_EQ(views::InkDropState::HIDDEN, |
| 350 observer_.target_state_at_last_animation_ended()); | 350 observer_.target_state_at_last_animation_ended()); |
| 351 } | 351 } |
| 352 | 352 |
| 353 } // namespace test | 353 } // namespace test |
| 354 } // namespace views | 354 } // namespace views |
| 355 | 355 |
| 356 #endif // UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_UNITTEST_H_ | 356 #endif // UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_UNITTEST_H_ |
| OLD | NEW |