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

Unified Diff: cc/trees/layer_tree_host_common_unittest.cc

Issue 1577263004: Communicate whether passive event listeners exist to cc. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master_wheel_passive_listeners
Patch Set: Fix Android/ChromeOS build problems with bit packed enum class Created 4 years, 11 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
Index: cc/trees/layer_tree_host_common_unittest.cc
diff --git a/cc/trees/layer_tree_host_common_unittest.cc b/cc/trees/layer_tree_host_common_unittest.cc
index 495b4c8ebdd56697dd730292647df03c1598781b..e746ad85f13368969aec7b950f49a4efd05041f6 100644
--- a/cc/trees/layer_tree_host_common_unittest.cc
+++ b/cc/trees/layer_tree_host_common_unittest.cc
@@ -8881,11 +8881,20 @@ TEST_F(LayerTreeHostCommonTest, InputHandlersRecursiveUpdateTest) {
EXPECT_EQ(root->layer_or_descendant_has_input_handler(), false);
- child->SetHaveWheelEventHandlers(true);
+ child->SetWheelEventProperties(EventListenerProperties::BLOCKING);
ExecuteCalculateDrawProperties(root);
EXPECT_EQ(root->layer_or_descendant_has_input_handler(), true);
- child->SetHaveWheelEventHandlers(false);
+ child->SetWheelEventProperties(EventListenerProperties::PASSIVE);
+ ExecuteCalculateDrawProperties(root);
+ EXPECT_EQ(root->layer_or_descendant_has_input_handler(), true);
+
+ child->SetWheelEventProperties(EventListenerProperties::BLOCKING |
+ EventListenerProperties::PASSIVE);
+ ExecuteCalculateDrawProperties(root);
+ EXPECT_EQ(root->layer_or_descendant_has_input_handler(), true);
+
+ child->SetWheelEventProperties(EventListenerProperties::NONE);
ExecuteCalculateDrawProperties(root);
EXPECT_EQ(root->layer_or_descendant_has_input_handler(), false);
}
@@ -9381,7 +9390,7 @@ TEST_F(LayerTreeHostCommonTest, LayerWithInputHandlerAndZeroOpacity) {
render_surface->SetMasksToBounds(true);
test_layer->SetDrawsContent(true);
test_layer->SetOpacity(0);
- test_layer->SetHaveWheelEventHandlers(true);
+ test_layer->SetWheelEventProperties(EventListenerProperties::BLOCKING);
ExecuteCalculateDrawProperties(root);
EXPECT_EQ(gfx::Rect(20, 20), test_layer->drawable_content_rect());

Powered by Google App Engine
This is Rietveld 408576698