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

Unified Diff: third_party/WebKit/Source/web/tests/ScrollingCoordinatorTest.cpp

Issue 2015783002: Invalidate touchEventTargetRects in ScrollingCoordinator when toggling touch emulation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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: third_party/WebKit/Source/web/tests/ScrollingCoordinatorTest.cpp
diff --git a/third_party/WebKit/Source/web/tests/ScrollingCoordinatorTest.cpp b/third_party/WebKit/Source/web/tests/ScrollingCoordinatorTest.cpp
index 12ebf904b6d06bc8173d091a6770b53d24d314b2..3feca74125d90c7b081f85879cb3333d2948788b 100644
--- a/third_party/WebKit/Source/web/tests/ScrollingCoordinatorTest.cpp
+++ b/third_party/WebKit/Source/web/tests/ScrollingCoordinatorTest.cpp
@@ -630,4 +630,20 @@ TEST_F(ScrollingCoordinatorTest, FixedPositionLosingBackingShouldTriggerMainThre
EXPECT_TRUE(scrollLayer->shouldScrollOnMainThread());
}
+TEST_F(ScrollingCoordinatorTest, TouchEventTargetRectsWithEmulatedTouch)
+{
+ RuntimeEnabledFeatures::setTouchEnabled(false);
+
+ registerMockedHttpURLLoad("touch-event-target-rects.html");
+ navigateTo(m_baseURL + "touch-event-target-rects.html");
+ forceFullCompositingUpdate();
+ ScrollingCoordinator* coordinator = webViewImpl()->page()->scrollingCoordinator();
+
+ EXPECT_EQ(0u, coordinator->touchEventTargetLayersCountForTest());
+ webViewImpl()->setTouchEventEmulationEnabled(true);
+ EXPECT_EQ(1u, coordinator->touchEventTargetLayersCountForTest());
+ webViewImpl()->setTouchEventEmulationEnabled(false);
+ EXPECT_EQ(0u, coordinator->touchEventTargetLayersCountForTest());
+}
+
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/web/WebViewImpl.cpp ('k') | third_party/WebKit/Source/web/tests/data/touch-event-target-rects.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698