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/browser_controls_offset_manager.h" | 5 #include "cc/input/browser_controls_offset_manager.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/memory/ptr_util.h" |
12 #include "base/time/time.h" | 13 #include "base/time/time.h" |
13 #include "cc/input/browser_controls_offset_manager_client.h" | 14 #include "cc/input/browser_controls_offset_manager_client.h" |
14 #include "cc/layers/layer_impl.h" | 15 #include "cc/layers/layer_impl.h" |
15 #include "cc/test/fake_impl_task_runner_provider.h" | 16 #include "cc/test/fake_impl_task_runner_provider.h" |
16 #include "cc/test/fake_layer_tree_host_impl.h" | 17 #include "cc/test/fake_layer_tree_host_impl.h" |
17 #include "cc/test/test_task_graph_runner.h" | 18 #include "cc/test/test_task_graph_runner.h" |
18 #include "cc/trees/layer_tree_impl.h" | 19 #include "cc/trees/layer_tree_impl.h" |
19 #include "testing/gtest/include/gtest/gtest.h" | 20 #include "testing/gtest/include/gtest/gtest.h" |
20 #include "ui/gfx/geometry/vector2d_f.h" | 21 #include "ui/gfx/geometry/vector2d_f.h" |
21 | 22 |
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
544 EXPECT_TRUE(manager->has_animation()); | 545 EXPECT_TRUE(manager->has_animation()); |
545 EXPECT_FLOAT_EQ(1.f, client.CurrentBrowserControlsShownRatio()); | 546 EXPECT_FLOAT_EQ(1.f, client.CurrentBrowserControlsShownRatio()); |
546 | 547 |
547 manager->UpdateBrowserControlsState(BOTH, SHOWN, true); | 548 manager->UpdateBrowserControlsState(BOTH, SHOWN, true); |
548 EXPECT_FALSE(manager->has_animation()); | 549 EXPECT_FALSE(manager->has_animation()); |
549 EXPECT_FLOAT_EQ(1.f, client.CurrentBrowserControlsShownRatio()); | 550 EXPECT_FLOAT_EQ(1.f, client.CurrentBrowserControlsShownRatio()); |
550 } | 551 } |
551 | 552 |
552 } // namespace | 553 } // namespace |
553 } // namespace cc | 554 } // namespace cc |
OLD | NEW |