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

Unified Diff: cc/trees/layer_tree_host_impl_unittest.cc

Issue 2471523002: Make touch events uncancelable during fling when they are on the current active scroll layer (Closed)
Patch Set: clean up code Created 4 years, 1 month 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_impl_unittest.cc
diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_host_impl_unittest.cc
index f1eee3c03f51dee8fa417459ef0cfbeab2515bed..711d85cc2a92ab1e89f98acb1c2bb345e067ee0b 100644
--- a/cc/trees/layer_tree_host_impl_unittest.cc
+++ b/cc/trees/layer_tree_host_impl_unittest.cc
@@ -811,7 +811,8 @@ TEST_F(LayerTreeHostImplTest, ScrollBlocksOnTouchEventHandlers) {
// Touch handler regions determine whether touch events block scroll.
root->SetTouchEventHandlerRegion(gfx::Rect(0, 0, 100, 100));
- EXPECT_TRUE(host_impl_->DoTouchEventsBlockScrollAt(gfx::Point(10, 10)));
+ EXPECT_NE(host_impl_->DoTouchEventsBlockScrollAt(gfx::Point(10, 10)),
+ InputHandler::TouchStartHitResult::HANDLER);
// But they don't influence the actual handling of the scroll gestures.
InputHandler::ScrollStatus status = host_impl_->ScrollBegin(
@@ -821,11 +822,14 @@ TEST_F(LayerTreeHostImplTest, ScrollBlocksOnTouchEventHandlers) {
status.main_thread_scrolling_reasons);
host_impl_->ScrollEnd(EndState().get());
- EXPECT_TRUE(host_impl_->DoTouchEventsBlockScrollAt(gfx::Point(10, 30)));
+ EXPECT_NE(host_impl_->DoTouchEventsBlockScrollAt(gfx::Point(10, 30)),
+ InputHandler::TouchStartHitResult::HANDLER);
root->SetTouchEventHandlerRegion(gfx::Rect());
- EXPECT_FALSE(host_impl_->DoTouchEventsBlockScrollAt(gfx::Point(10, 30)));
+ EXPECT_EQ(host_impl_->DoTouchEventsBlockScrollAt(gfx::Point(10, 30)),
+ InputHandler::TouchStartHitResult::HANDLER);
child->SetTouchEventHandlerRegion(gfx::Rect(0, 0, 50, 50));
- EXPECT_TRUE(host_impl_->DoTouchEventsBlockScrollAt(gfx::Point(10, 30)));
+ EXPECT_NE(host_impl_->DoTouchEventsBlockScrollAt(gfx::Point(10, 30)),
+ InputHandler::TouchStartHitResult::HANDLER);
}
TEST_F(LayerTreeHostImplTest, FlingOnlyWhenScrollingTouchscreen) {

Powered by Google App Engine
This is Rietveld 408576698