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_animator.h" | 5 #include "ui/compositor/layer_animator.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/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
11 #include "base/time/time.h" | 11 #include "base/time/time.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
13 #include "ui/compositor/layer.h" | 13 #include "ui/compositor/layer.h" |
14 #include "ui/compositor/layer_animation_delegate.h" | 14 #include "ui/compositor/layer_animation_delegate.h" |
15 #include "ui/compositor/layer_animation_element.h" | 15 #include "ui/compositor/layer_animation_element.h" |
16 #include "ui/compositor/layer_animation_sequence.h" | 16 #include "ui/compositor/layer_animation_sequence.h" |
17 #include "ui/compositor/scoped_animation_duration_scale_mode.h" | 17 #include "ui/compositor/scoped_animation_duration_scale_mode.h" |
18 #include "ui/compositor/scoped_layer_animation_settings.h" | 18 #include "ui/compositor/scoped_layer_animation_settings.h" |
19 #include "ui/compositor/test/layer_animator_test_controller.h" | 19 #include "ui/compositor/test/layer_animator_test_controller.h" |
20 #include "ui/compositor/test/test_layer_animation_delegate.h" | 20 #include "ui/compositor/test/test_layer_animation_delegate.h" |
21 #include "ui/compositor/test/test_layer_animation_observer.h" | 21 #include "ui/compositor/test/test_layer_animation_observer.h" |
22 #include "ui/compositor/test/test_utils.h" | 22 #include "ui/compositor/test/test_utils.h" |
23 #include "ui/gfx/rect.h" | 23 #include "ui/gfx/rect.h" |
24 #include "ui/gfx/transform.h" | 24 #include "ui/gfx/transform.h" |
25 | 25 |
| 26 using gfx::AnimationContainerElement; |
| 27 |
26 namespace ui { | 28 namespace ui { |
27 | 29 |
28 namespace { | 30 namespace { |
29 | 31 |
30 // Converts |color| to a string. Each component of the color is separated by a | 32 // Converts |color| to a string. Each component of the color is separated by a |
31 // space and the order if A R G B. | 33 // space and the order if A R G B. |
32 std::string ColorToString(SkColor color) { | 34 std::string ColorToString(SkColor color) { |
33 return base::StringPrintf("%d %d %d %d", SkColorGetA(color), | 35 return base::StringPrintf("%d %d %d %d", SkColorGetA(color), |
34 SkColorGetR(color), SkColorGetG(color), | 36 SkColorGetR(color), SkColorGetG(color), |
35 SkColorGetB(color)); | 37 SkColorGetB(color)); |
(...skipping 2363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2399 | 2401 |
2400 parent.SetTransform(parent_end); | 2402 parent.SetTransform(parent_end); |
2401 | 2403 |
2402 EXPECT_TRUE(child.GetAnimator()->is_animating()); | 2404 EXPECT_TRUE(child.GetAnimator()->is_animating()); |
2403 EXPECT_TRUE(child.GetTargetTransform().IsIdentity()) | 2405 EXPECT_TRUE(child.GetTargetTransform().IsIdentity()) |
2404 << child.GetTargetTransform().ToString(); | 2406 << child.GetTargetTransform().ToString(); |
2405 | 2407 |
2406 } | 2408 } |
2407 | 2409 |
2408 } // namespace ui | 2410 } // namespace ui |
OLD | NEW |