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

Unified Diff: cc/trees/layer_tree_host_impl_unittest.cc

Issue 2047093002: Remove enable/disable wheel gestures setting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@can_scroll_remove
Patch Set: Remove unused, uninitialized variable on mac causing occasional failure Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | cc/trees/layer_tree_settings.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl_unittest.cc
diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_host_impl_unittest.cc
index 2183897c318ab360222127822bebb9c611d16891..d467f31b7fc9ac901cfbb20f0675ee77fd530d29 100644
--- a/cc/trees/layer_tree_host_impl_unittest.cc
+++ b/cc/trees/layer_tree_host_impl_unittest.cc
@@ -763,40 +763,17 @@ TEST_F(LayerTreeHostImplTest, ScrollBlocksOnWheelEventHandlers) {
host_impl_->SetViewportSize(gfx::Size(50, 50));
DrawFrame();
- // With registered event handlers, wheel scrolls don't necessarily
- // have to go to the main thread.
+ // Wheel handlers determine whether mouse events block scroll.
host_impl_->active_tree()->set_event_listener_properties(
EventListenerClass::kMouseWheel, EventListenerProperties::kBlocking);
+ EXPECT_EQ(
+ EventListenerProperties::kBlocking,
+ host_impl_->GetEventListenerProperties(EventListenerClass::kMouseWheel));
+
+ // But they don't influence the actual handling of the scroll gestures.
InputHandler::ScrollStatus status =
host_impl_->ScrollBegin(BeginState(gfx::Point()).get(),
InputHandler::WHEEL);
- EXPECT_EQ(InputHandler::SCROLL_ON_MAIN_THREAD, status.thread);
- EXPECT_EQ(MainThreadScrollingReason::kEventHandlers,
- status.main_thread_scrolling_reasons);
-
- host_impl_->active_tree()->set_event_listener_properties(
- EventListenerClass::kMouseWheel,
- EventListenerProperties::kBlockingAndPassive);
- status = host_impl_->ScrollBegin(BeginState(gfx::Point()).get(),
- InputHandler::WHEEL);
- EXPECT_EQ(InputHandler::SCROLL_ON_MAIN_THREAD, status.thread);
- EXPECT_EQ(MainThreadScrollingReason::kEventHandlers,
- status.main_thread_scrolling_reasons);
-
- // But gesture scrolls can still be handled.
- status = host_impl_->ScrollBegin(BeginState(gfx::Point()).get(),
- InputHandler::TOUCHSCREEN);
- EXPECT_EQ(InputHandler::SCROLL_ON_IMPL_THREAD, status.thread);
- EXPECT_EQ(MainThreadScrollingReason::kNotScrollingOnMain,
- status.main_thread_scrolling_reasons);
- host_impl_->ScrollEnd(EndState().get());
-
- // And if the handlers go away, wheel scrolls can again be processed
- // on impl.
- host_impl_->active_tree()->set_event_listener_properties(
- EventListenerClass::kMouseWheel, EventListenerProperties::kNone);
- status = host_impl_->ScrollBegin(BeginState(gfx::Point()).get(),
- InputHandler::WHEEL);
EXPECT_EQ(InputHandler::SCROLL_ON_IMPL_THREAD, status.thread);
EXPECT_EQ(MainThreadScrollingReason::kNotScrollingOnMain,
status.main_thread_scrolling_reasons);
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | cc/trees/layer_tree_settings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698