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