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

Unified Diff: cc/trees/layer_tree_host_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 nits 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/trees/layer_tree_host_impl_unittest.cc ('k') | cc/trees/layer_tree_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_unittest.cc
diff --git a/cc/trees/layer_tree_host_unittest.cc b/cc/trees/layer_tree_host_unittest.cc
index 560df10a90961065e4cdb7e918e0332a2b8cb9a4..89c47e14b00f1908836a9f8bb0d5181b85c239d1 100644
--- a/cc/trees/layer_tree_host_unittest.cc
+++ b/cc/trees/layer_tree_host_unittest.cc
@@ -1333,7 +1333,10 @@ class LayerTreeHostTestCommit : public LayerTreeHostTest {
void BeginTest() override {
layer_tree_host()->SetViewportSize(gfx::Size(20, 20));
layer_tree_host()->set_background_color(SK_ColorGRAY);
- layer_tree_host()->SetHaveWheelEventHandlers(true);
+ layer_tree_host()->SetEventListenerProperties(
+ EventListenerClass::kMouseWheel, EventListenerProperties::kPassive);
+ layer_tree_host()->SetEventListenerProperties(
+ EventListenerClass::kTouch, EventListenerProperties::kBlocking);
layer_tree_host()->SetHaveScrollEventHandlers(true);
PostSetNeedsCommitToMainThread();
@@ -1342,7 +1345,12 @@ class LayerTreeHostTestCommit : public LayerTreeHostTest {
void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override {
EXPECT_EQ(gfx::Size(20, 20), impl->DrawViewportSize());
EXPECT_EQ(SK_ColorGRAY, impl->active_tree()->background_color());
- EXPECT_TRUE(impl->active_tree()->have_wheel_event_handlers());
+ EXPECT_EQ(EventListenerProperties::kPassive,
+ impl->active_tree()->event_listener_properties(
+ EventListenerClass::kMouseWheel));
+ EXPECT_EQ(EventListenerProperties::kBlocking,
+ impl->active_tree()->event_listener_properties(
+ EventListenerClass::kTouch));
EXPECT_TRUE(impl->active_tree()->have_scroll_event_handlers());
EndTest();
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | cc/trees/layer_tree_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698