| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/compositor/layer_animation_element.h" | 5 #include "ui/compositor/layer_animation_element.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
| 11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
| 12 #include "ui/compositor/layer_animation_delegate.h" | 12 #include "ui/compositor/layer_animation_delegate.h" |
| 13 #include "ui/compositor/scoped_animation_duration_scale_mode.h" | 13 #include "ui/compositor/scoped_animation_duration_scale_mode.h" |
| 14 #include "ui/compositor/test/test_layer_animation_delegate.h" | 14 #include "ui/compositor/test/test_layer_animation_delegate.h" |
| 15 #include "ui/compositor/test/test_utils.h" | 15 #include "ui/compositor/test/test_utils.h" |
| 16 #include "ui/gfx/rect.h" | 16 #include "ui/gfx/geometry/rect.h" |
| 17 #include "ui/gfx/transform.h" | 17 #include "ui/gfx/transform.h" |
| 18 | 18 |
| 19 namespace ui { | 19 namespace ui { |
| 20 | 20 |
| 21 namespace { | 21 namespace { |
| 22 | 22 |
| 23 // Check that the transformation element progresses the delegate as expected and | 23 // Check that the transformation element progresses the delegate as expected and |
| 24 // that the element can be reused after it completes. | 24 // that the element can be reused after it completes. |
| 25 TEST(LayerAnimationElementTest, TransformElement) { | 25 TEST(LayerAnimationElementTest, TransformElement) { |
| 26 TestLayerAnimationDelegate delegate; | 26 TestLayerAnimationDelegate delegate; |
| (...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 427 element->Abort(&delegate); | 427 element->Abort(&delegate); |
| 428 target_transform.Blend(start_transform, | 428 target_transform.Blend(start_transform, |
| 429 gfx::Tween::CalculateValue(tween_type, 0.5)); | 429 gfx::Tween::CalculateValue(tween_type, 0.5)); |
| 430 CheckApproximatelyEqual(target_transform, | 430 CheckApproximatelyEqual(target_transform, |
| 431 delegate.GetTransformForAnimation()); | 431 delegate.GetTransformForAnimation()); |
| 432 } | 432 } |
| 433 | 433 |
| 434 } // namespace | 434 } // namespace |
| 435 | 435 |
| 436 } // namespace ui | 436 } // namespace ui |
| OLD | NEW |