Index: LayoutTests/fast/events/touch/compositor-touch-hit-rects-global.html |
diff --git a/LayoutTests/fast/events/touch/compositor-touch-hit-rects-global.html b/LayoutTests/fast/events/touch/compositor-touch-hit-rects-global.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..dfeb0af8d39cc5496d4fdffc533b241263a4cb81 |
--- /dev/null |
+++ b/LayoutTests/fast/events/touch/compositor-touch-hit-rects-global.html |
@@ -0,0 +1,44 @@ |
+<!DOCTYPE html> |
+<html> |
+<head> |
+<link rel="stylesheet" href="resources/compositor-touch-hit-rects.css"> |
+<style> |
+body { |
+ /* make it easy to validate rects are covering the entire document */ |
+ height: 1968px; |
+ margin: 16px 5px; |
+} |
+</style> |
+</head> |
+<body> |
+<p id="description"> |
+This tests verifies the hit test regions given to the compositor in the simple case where |
+touch handles cover (or nearly cover) the entire document. It can only be run in DumpRenderTree. |
+</p> |
+ |
+<div id="tests"> |
+</div> |
+ |
+<div id="console"></div> |
+<script src="resources/compositor-touch-hit-rects.js"></script> |
+<script> |
+ |
+function runGlobalTest(name, element) { |
+ // With a global handler, no other handlers should matter |
+ var elements = [document.getElementById('description'), element, document.getElementById('tests')]; |
+ for (var i = 0; i < elements.length; i++) |
+ elements[i].addEventListener('touchmove', listener, false); |
+ |
+ logRects(name, true); |
+ |
+ for (var i = 0; i < elements.length; i++) |
+ elements[i].removeEventListener('touchmove', listener, false); |
+} |
+ |
+function additionalTests() { |
+ runGlobalTest('document', document); |
+ runGlobalTest('html', document.documentElement); |
+ runGlobalTest('body', document.body); |
+} |
+</script> |
+</body> |