Chromium Code Reviews| Index: LayoutTests/fast/events/touch/touch-rect-assert-first-layer-special.html |
| diff --git a/LayoutTests/fast/events/touch/touch-rect-assert-first-layer-special.html b/LayoutTests/fast/events/touch/touch-rect-assert-first-layer-special.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..71d3cb35bb795f68509d84019aa651292286deb0 |
| --- /dev/null |
| +++ b/LayoutTests/fast/events/touch/touch-rect-assert-first-layer-special.html |
| @@ -0,0 +1,34 @@ |
| +<!DOCTYPE HTML> |
| +<html> |
| +<head> |
| +<style> |
| +/* By applying a transform to the html element, we ensure that |
| +RenderGeometryMap::pushMappingsToAncestor takes the slow bath (which doesn't push |
| +the RenderView */ |
| +html { |
| + -webkit-transform: scale(1.1); |
| +} |
| +</style> |
| +<script src="../../../resources/js-test.js"></script> |
| +</head> |
| +<body> |
| +<p id="description"></p> |
| +<div id="console"></div> |
| +<div id="touchtarget" ontouchstart="alert()">Foo</div> |
|
leviw_travelin_and_unemployed
2014/01/30 03:13:01
Why the alert? If it's for manual testing, you may
|
| +<script> |
| + description("Make sure we don't ASSERT when the first layer is special and can't use the RenderGeometryMap fast path - crbug.com/339141."); |
| + |
| + if (window.internals) { |
|
leviw_travelin_and_unemployed
2014/01/30 03:13:01
Nit: braces for one-line if statement.
|
| + window.internals.settings.setForceCompositingMode(true); |
| + } |
| + |
| + var rects; |
| + // Verify we actually have a hit rect in the document. |
| + if (window.internals) { |
| + rects = window.internals.touchEventTargetLayerRects(document); |
| + shouldBe("rects.length", "1"); |
| + shouldBeEqualToString("rects[0].layerRootNode.nodeName", "#document"); |
| + } |
| +</script> |
| +</body> |
| +</html> |