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

Unified Diff: cc/layer_tree_host_impl_unittest.cc

Issue 11776033: Ensure that render surface layer list is not dirty/empty before hit testing for touch events (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Calling ensureRenderSurfaceLayerList Created 7 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/layer_tree_host_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layer_tree_host_impl_unittest.cc
diff --git a/cc/layer_tree_host_impl_unittest.cc b/cc/layer_tree_host_impl_unittest.cc
index 6ceeb230e3cd1c3c4ae1e61f689e65f9e05b2f65..4bc8be73edbf19abafb70a9e5a51fedef755c82f 100644
--- a/cc/layer_tree_host_impl_unittest.cc
+++ b/cc/layer_tree_host_impl_unittest.cc
@@ -550,6 +550,20 @@ TEST_P(LayerTreeHostImplTest, maxScrollOffsetChangedByDeviceScaleFactor)
EXPECT_EQ(m_hostImpl->rootLayer()->maxScrollOffset(), gfx::Vector2d(75, 75));
}
+TEST_P(LayerTreeHostImplTest, clearRootRenderSurfaceAndHitTestTouchHandlerRegion)
+{
+ setupScrollAndContentsLayers(gfx::Size(100, 100));
+ m_hostImpl->setViewportSize(gfx::Size(50, 50), gfx::Size(50, 50));
+ initializeRendererAndDrawFrame();
+
+ // We should be able to hit test for touch event handlers even if the root layer loses
+ // its render surface after the most recent render.
+ m_hostImpl->rootLayer()->clearRenderSurface();
+ m_hostImpl->setNeedsUpdateDrawProperties();
+
+ EXPECT_EQ(m_hostImpl->haveTouchEventHandlersAt(gfx::Point(0, 0)), false);
+}
+
TEST_P(LayerTreeHostImplTest, implPinchZoom)
{
// This test is specific to the page-scale based pinch zoom.
« no previous file with comments | « cc/layer_tree_host_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698