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

Unified Diff: cc/trees/layer_tree_host_impl_unittest.cc

Issue 1686833002: Add knowledge about blocking and passive event listeners. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix typo Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/layers/layer_impl.cc ('k') | content/renderer/gpu/render_widget_compositor.cc » ('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 d67e6e3e695a7bfc3e5c9edc59f8ba3f827f7aee..eab2ff1dfcff261ddc985af5da2dec484b00031e 100644
--- a/cc/trees/layer_tree_host_impl_unittest.cc
+++ b/cc/trees/layer_tree_host_impl_unittest.cc
@@ -725,6 +725,15 @@ TEST_F(LayerTreeHostImplTest, ScrollBlocksOnWheelEventHandlers) {
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::GESTURE);
« no previous file with comments | « cc/layers/layer_impl.cc ('k') | content/renderer/gpu/render_widget_compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698