| 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" |
| 11 #include "ui/gfx/color_palette.h" |
| 11 #include "ui/gfx/geometry/size.h" | 12 #include "ui/gfx/geometry/size.h" |
| 12 #include "ui/gfx/geometry/size_f.h" | 13 #include "ui/gfx/geometry/size_f.h" |
| 13 #include "ui/views/animation/ink_drop_animation.h" | 14 #include "ui/views/animation/ink_drop_animation.h" |
| 14 #include "ui/views/animation/ink_drop_animation_observer.h" | 15 #include "ui/views/animation/ink_drop_animation_observer.h" |
| 15 #include "ui/views/animation/ink_drop_state.h" | 16 #include "ui/views/animation/ink_drop_state.h" |
| 16 #include "ui/views/animation/square_ink_drop_animation.h" | 17 #include "ui/views/animation/square_ink_drop_animation.h" |
| 17 #include "ui/views/animation/test/ink_drop_animation_test_api.h" | 18 #include "ui/views/animation/test/ink_drop_animation_test_api.h" |
| 18 #include "ui/views/animation/test/square_ink_drop_animation_test_api.h" | 19 #include "ui/views/animation/test/square_ink_drop_animation_test_api.h" |
| 19 #include "ui/views/animation/test/test_ink_drop_animation_observer.h" | 20 #include "ui/views/animation/test/test_ink_drop_animation_observer.h" |
| 20 | 21 |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 scoped_ptr<InkDropAnimationTestApi> test_api_; | 223 scoped_ptr<InkDropAnimationTestApi> test_api_; |
| 223 | 224 |
| 224 private: | 225 private: |
| 225 DISALLOW_COPY_AND_ASSIGN(InkDropAnimationDerivativesTest); | 226 DISALLOW_COPY_AND_ASSIGN(InkDropAnimationDerivativesTest); |
| 226 }; | 227 }; |
| 227 | 228 |
| 228 InkDropAnimationDerivativesTest::InkDropAnimationDerivativesTest() { | 229 InkDropAnimationDerivativesTest::InkDropAnimationDerivativesTest() { |
| 229 switch (GetParam()) { | 230 switch (GetParam()) { |
| 230 case SQUARE_INK_DROP_ANIMATION: { | 231 case SQUARE_INK_DROP_ANIMATION: { |
| 231 SquareInkDropAnimation* typed_ink_drop_animation = | 232 SquareInkDropAnimation* typed_ink_drop_animation = |
| 232 new SquareInkDropAnimation(gfx::Size(10, 10), 2, gfx::Size(8, 8), 1); | 233 new SquareInkDropAnimation(gfx::kPlaceholderColor, gfx::Size(10, 10), |
| 234 2, gfx::Size(8, 8), 1); |
| 233 ink_drop_animation_.reset(typed_ink_drop_animation); | 235 ink_drop_animation_.reset(typed_ink_drop_animation); |
| 234 test_api_.reset( | 236 test_api_.reset( |
| 235 new SquareInkDropAnimationTestApi(typed_ink_drop_animation)); | 237 new SquareInkDropAnimationTestApi(typed_ink_drop_animation)); |
| 236 break; | 238 break; |
| 237 } | 239 } |
| 238 } | 240 } |
| 239 ink_drop_animation_->AddObserver(&observer_); | 241 ink_drop_animation_->AddObserver(&observer_); |
| 240 test_api_->SetDisableAnimationTimers(true); | 242 test_api_->SetDisableAnimationTimers(true); |
| 241 } | 243 } |
| 242 | 244 |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 349 ink_drop_animation_->AnimateToState(InkDropState::HIDDEN); | 351 ink_drop_animation_->AnimateToState(InkDropState::HIDDEN); |
| 350 | 352 |
| 351 ASSERT_TRUE(test_api_->HasActiveAnimations()); | 353 ASSERT_TRUE(test_api_->HasActiveAnimations()); |
| 352 ink_drop_animation_.reset(); | 354 ink_drop_animation_.reset(); |
| 353 } | 355 } |
| 354 | 356 |
| 355 } // namespace test | 357 } // namespace test |
| 356 } // namespace views | 358 } // namespace views |
| 357 | 359 |
| 358 #endif // UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_UNITTEST_H_ | 360 #endif // UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_UNITTEST_H_ |
| OLD | NEW |