OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/view_manager/animation_runner.h" | 5 #include "components/view_manager/animation_runner.h" |
6 | 6 |
7 #include "base/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
8 #include "components/view_manager/animation_runner_observer.h" | 8 #include "components/view_manager/animation_runner_observer.h" |
| 9 #include "components/view_manager/public/interfaces/view_manager_constants.mojom
.h" |
9 #include "components/view_manager/scheduled_animation_group.h" | 10 #include "components/view_manager/scheduled_animation_group.h" |
10 #include "components/view_manager/server_view.h" | 11 #include "components/view_manager/server_view.h" |
11 #include "components/view_manager/test_server_view_delegate.h" | 12 #include "components/view_manager/test_server_view_delegate.h" |
12 #include "mojo/converters/geometry/geometry_type_converters.h" | 13 #include "mojo/converters/geometry/geometry_type_converters.h" |
13 #include "mojo/converters/transform/transform_type_converters.h" | 14 #include "mojo/converters/transform/transform_type_converters.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
15 #include "third_party/mojo_services/src/view_manager/public/interfaces/view_mana
ger_constants.mojom.h" | |
16 | 16 |
17 using base::TimeDelta; | 17 using base::TimeDelta; |
18 using mojo::ANIMATION_PROPERTY_NONE; | 18 using mojo::ANIMATION_PROPERTY_NONE; |
19 using mojo::ANIMATION_PROPERTY_OPACITY; | 19 using mojo::ANIMATION_PROPERTY_OPACITY; |
20 using mojo::ANIMATION_PROPERTY_TRANSFORM; | 20 using mojo::ANIMATION_PROPERTY_TRANSFORM; |
21 using mojo::ANIMATION_TWEEN_TYPE_LINEAR; | 21 using mojo::ANIMATION_TWEEN_TYPE_LINEAR; |
22 using mojo::AnimationElement; | 22 using mojo::AnimationElement; |
23 using mojo::AnimationGroup; | 23 using mojo::AnimationGroup; |
24 using mojo::AnimationProperty; | 24 using mojo::AnimationProperty; |
25 using mojo::AnimationSequence; | 25 using mojo::AnimationSequence; |
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
632 ASSERT_EQ(0u, runner_observer_.changes()->size()); | 632 ASSERT_EQ(0u, runner_observer_.changes()->size()); |
633 | 633 |
634 // Animate to end. | 634 // Animate to end. |
635 runner_.Tick(initial_time_ + TimeDelta::FromMicroseconds(2000)); | 635 runner_.Tick(initial_time_ + TimeDelta::FromMicroseconds(2000)); |
636 ASSERT_EQ(1u, runner_observer_.changes()->size()); | 636 ASSERT_EQ(1u, runner_observer_.changes()->size()); |
637 EXPECT_EQ("done", runner_observer_.changes()->at(0)); | 637 EXPECT_EQ("done", runner_observer_.changes()->at(0)); |
638 EXPECT_EQ(animation_id2, runner_observer_.change_ids()->at(0)); | 638 EXPECT_EQ(animation_id2, runner_observer_.change_ids()->at(0)); |
639 } | 639 } |
640 | 640 |
641 } // namespace view_manager | 641 } // namespace view_manager |
OLD | NEW |