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

Unified Diff: cc/trees/layer_tree_host_impl_unittest.cc

Issue 1646603004: Move scroll event handlers from layer to layer tree view. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master_cc_listeners
Patch Set: Rebase 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
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | cc/trees/layer_tree_host_unittest.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 a66eb514e9c8764afec0d43a1473c1b9e6f99c97..9ea8484324c2820d75b1780db35fd331783c7f36 100644
--- a/cc/trees/layer_tree_host_impl_unittest.cc
+++ b/cc/trees/layer_tree_host_impl_unittest.cc
@@ -964,8 +964,8 @@ TEST_F(LayerTreeHostImplTest, NonFastScrollableRegionWithOffset) {
}
TEST_F(LayerTreeHostImplTest, ScrollHandlerNotPresent) {
- LayerImpl* scroll_layer = SetupScrollAndContentsLayers(gfx::Size(200, 200));
- EXPECT_FALSE(scroll_layer->have_scroll_event_handlers());
+ SetupScrollAndContentsLayers(gfx::Size(200, 200));
+ EXPECT_FALSE(host_impl_->active_tree()->have_scroll_event_handlers());
host_impl_->SetViewportSize(gfx::Size(50, 50));
DrawFrame();
@@ -978,8 +978,8 @@ TEST_F(LayerTreeHostImplTest, ScrollHandlerNotPresent) {
}
TEST_F(LayerTreeHostImplTest, ScrollHandlerPresent) {
- LayerImpl* scroll_layer = SetupScrollAndContentsLayers(gfx::Size(200, 200));
- scroll_layer->SetHaveScrollEventHandlers(true);
+ SetupScrollAndContentsLayers(gfx::Size(200, 200));
+ host_impl_->active_tree()->set_have_scroll_event_handlers(true);
host_impl_->SetViewportSize(gfx::Size(50, 50));
DrawFrame();
@@ -7982,7 +7982,7 @@ TEST_F(LayerTreeHostImplTest, SimpleSwapPromiseMonitor) {
&set_needs_commit_count,
&set_needs_redraw_count,
&forward_to_main_count));
- LayerImpl* scroll_layer = SetupScrollAndContentsLayers(gfx::Size(100, 100));
+ SetupScrollAndContentsLayers(gfx::Size(100, 100));
// Scrolling normally should not trigger any forwarding.
EXPECT_EQ(InputHandler::SCROLL_ON_IMPL_THREAD,
@@ -8001,7 +8001,7 @@ TEST_F(LayerTreeHostImplTest, SimpleSwapPromiseMonitor) {
// Scrolling with a scroll handler should defer the swap to the main
// thread.
- scroll_layer->SetHaveScrollEventHandlers(true);
+ host_impl_->active_tree()->set_have_scroll_event_handlers(true);
EXPECT_EQ(InputHandler::SCROLL_ON_IMPL_THREAD,
host_impl_->ScrollBegin(BeginState(gfx::Point()).get(),
InputHandler::GESTURE)
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698