| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "cc/input/top_controls_manager.h" | 5 #include "cc/input/top_controls_manager.h" |
| 6 | 6 |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "base/time/time.h" | 8 #include "base/time/time.h" |
| 9 #include "cc/input/top_controls_manager_client.h" | 9 #include "cc/input/top_controls_manager_client.h" |
| 10 #include "cc/layers/layer_impl.h" | 10 #include "cc/layers/layer_impl.h" |
| 11 #include "cc/test/fake_impl_proxy.h" | 11 #include "cc/test/fake_impl_proxy.h" |
| 12 #include "cc/test/fake_layer_tree_host_impl.h" | 12 #include "cc/test/fake_layer_tree_host_impl.h" |
| 13 #include "cc/test/test_shared_bitmap_manager.h" | 13 #include "cc/test/test_shared_bitmap_manager.h" |
| 14 #include "cc/trees/layer_tree_impl.h" | 14 #include "cc/trees/layer_tree_impl.h" |
| 15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
| 16 #include "ui/gfx/frame_time.h" | 16 #include "ui/gfx/frame_time.h" |
| 17 #include "ui/gfx/vector2d_f.h" | 17 #include "ui/gfx/geometry/vector2d_f.h" |
| 18 | 18 |
| 19 namespace cc { | 19 namespace cc { |
| 20 namespace { | 20 namespace { |
| 21 | 21 |
| 22 static const float kTopControlsHeight = 100; | 22 static const float kTopControlsHeight = 100; |
| 23 | 23 |
| 24 class MockTopControlsManagerClient : public TopControlsManagerClient { | 24 class MockTopControlsManagerClient : public TopControlsManagerClient { |
| 25 public: | 25 public: |
| 26 MockTopControlsManagerClient(float top_controls_show_threshold, | 26 MockTopControlsManagerClient(float top_controls_show_threshold, |
| 27 float top_controls_hide_threshold) | 27 float top_controls_hide_threshold) |
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 manager->Animate(time); | 373 manager->Animate(time); |
| 374 EXPECT_GT(manager->ControlsTopOffset(), previous_offset); | 374 EXPECT_GT(manager->ControlsTopOffset(), previous_offset); |
| 375 previous_offset = manager->ControlsTopOffset(); | 375 previous_offset = manager->ControlsTopOffset(); |
| 376 } | 376 } |
| 377 EXPECT_FALSE(manager->animation()); | 377 EXPECT_FALSE(manager->animation()); |
| 378 EXPECT_EQ(0.f, manager->ControlsTopOffset()); | 378 EXPECT_EQ(0.f, manager->ControlsTopOffset()); |
| 379 } | 379 } |
| 380 | 380 |
| 381 } // namespace | 381 } // namespace |
| 382 } // namespace cc | 382 } // namespace cc |
| OLD | NEW |