| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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/trees/layer_tree_host_impl.h" | 5 #include "cc/trees/layer_tree_host_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <cmath> | 10 #include <cmath> |
| (...skipping 11691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11702 scrollbar_2_animation_controller->mouse_is_over_scrollbar(VERTICAL)); | 11702 scrollbar_2_animation_controller->mouse_is_over_scrollbar(VERTICAL)); |
| 11703 host_impl_->MouseMoveAt(gfx::Point(10, 150)); | 11703 host_impl_->MouseMoveAt(gfx::Point(10, 150)); |
| 11704 EXPECT_TRUE( | 11704 EXPECT_TRUE( |
| 11705 scrollbar_1_animation_controller->mouse_is_near_scrollbar(VERTICAL)); | 11705 scrollbar_1_animation_controller->mouse_is_near_scrollbar(VERTICAL)); |
| 11706 EXPECT_TRUE( | 11706 EXPECT_TRUE( |
| 11707 scrollbar_1_animation_controller->mouse_is_over_scrollbar(VERTICAL)); | 11707 scrollbar_1_animation_controller->mouse_is_over_scrollbar(VERTICAL)); |
| 11708 EXPECT_FALSE( | 11708 EXPECT_FALSE( |
| 11709 scrollbar_2_animation_controller->mouse_is_near_scrollbar(VERTICAL)); | 11709 scrollbar_2_animation_controller->mouse_is_near_scrollbar(VERTICAL)); |
| 11710 EXPECT_FALSE( | 11710 EXPECT_FALSE( |
| 11711 scrollbar_2_animation_controller->mouse_is_over_scrollbar(VERTICAL)); | 11711 scrollbar_2_animation_controller->mouse_is_over_scrollbar(VERTICAL)); |
| 11712 |
| 11713 // Capture scrollbar_1, then move mouse to scrollbar_2's layer, should post an |
| 11714 // event to fade out scrollbar_1. |
| 11715 animation_task_ = base::Closure(); |
| 11716 |
| 11717 host_impl_->MouseDown(); |
| 11718 host_impl_->MouseMoveAt(gfx::Point(100, 150)); |
| 11719 host_impl_->MouseUp(); |
| 11720 |
| 11721 EXPECT_FALSE(animation_task_.Equals(base::Closure())); |
| 11712 } | 11722 } |
| 11713 | 11723 |
| 11714 TEST_F(LayerTreeHostImplTest, | 11724 TEST_F(LayerTreeHostImplTest, |
| 11715 LayerTreeHostImplTestScrollbarStatesInMainThreadScorlling) { | 11725 LayerTreeHostImplTestScrollbarStatesInMainThreadScorlling) { |
| 11716 SetupMouseMoveAtTestScrollbarStates(true); | 11726 SetupMouseMoveAtTestScrollbarStates(true); |
| 11717 } | 11727 } |
| 11718 | 11728 |
| 11719 TEST_F(LayerTreeHostImplTest, | 11729 TEST_F(LayerTreeHostImplTest, |
| 11720 LayerTreeHostImplTestScrollbarStatesInNotMainThreadScorlling) { | 11730 LayerTreeHostImplTestScrollbarStatesInNotMainThreadScorlling) { |
| 11721 SetupMouseMoveAtTestScrollbarStates(false); | 11731 SetupMouseMoveAtTestScrollbarStates(false); |
| 11722 } | 11732 } |
| 11723 | 11733 |
| 11724 } // namespace | 11734 } // namespace |
| 11725 } // namespace cc | 11735 } // namespace cc |
| OLD | NEW |