Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1080)

Side by Side Diff: cc/trees/layer_tree_host_impl_unittest.cc

Issue 2683763004: Pass MouseUp to the captured scrollbar animation controller in layer tree (Closed)
Patch Set: bokan's comment addressed Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698