| 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 #include "ui/compositor/callback_layer_animation_observer.h" | 5 #include "ui/compositor/callback_layer_animation_observer.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
| 11 #include "ui/compositor/layer_animation_sequence.h" | 12 #include "ui/compositor/layer_animation_sequence.h" |
| 12 #include "ui/compositor/test/layer_animation_observer_test_api.h" | 13 #include "ui/compositor/test/layer_animation_observer_test_api.h" |
| 13 | 14 |
| 14 namespace ui { | 15 namespace ui { |
| 15 namespace test { | 16 namespace test { |
| 16 | 17 |
| 17 // Simple class that tracks whether callbacks were invoked and when. | 18 // Simple class that tracks whether callbacks were invoked and when. |
| 18 class TestCallbacks { | 19 class TestCallbacks { |
| (...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 578 observer_->OnLayerAnimationEnded(sequence_4); | 579 observer_->OnLayerAnimationEnded(sequence_4); |
| 579 | 580 |
| 580 EXPECT_FALSE(observer_->active()); | 581 EXPECT_FALSE(observer_->active()); |
| 581 EXPECT_TRUE(callbacks_->animations_started()); | 582 EXPECT_TRUE(callbacks_->animations_started()); |
| 582 EXPECT_TRUE(callbacks_->animations_ended()); | 583 EXPECT_TRUE(callbacks_->animations_ended()); |
| 583 EXPECT_EQ(4, observer_->successful_count()); | 584 EXPECT_EQ(4, observer_->successful_count()); |
| 584 } | 585 } |
| 585 | 586 |
| 586 } // namespace test | 587 } // namespace test |
| 587 } // namespace ui | 588 } // namespace ui |
| OLD | NEW |