4 <link rel=
"stylesheet" href=
"resources/compositor-touch-hit-rects.css">
7 /* make it easy to validate rects are covering the entire document */
15 This tests verifies the hit test regions given to the compositor in the simple case where
16 touch handles cover (or nearly cover) the entire document. It can only be run in DumpRenderTree.
22 <div id=
"console"></div>
23 <script src=
"resources/compositor-touch-hit-rects.js"></script>
26 function runGlobalTest(name
, element
) {
27 // With a global handler, no other handlers should matter
28 var elements
= [document
.getElementById('description'), element
, document
.getElementById('tests')];
29 for (var i
= 0; i
< elements
.length
; i
++)
30 elements
[i
].addEventListener('touchmove', listener
, false);
34 for (var i
= 0; i
< elements
.length
; i
++)
35 elements
[i
].removeEventListener('touchmove', listener
, false);
38 function runOverlayTest() {
39 if (window
.testRunner
)
40 testRunner
.addWebPageOverlay();
42 logRects('webPageOverlay', true);
44 if (window
.testRunner
)
45 testRunner
.removeWebPageOverlay();
48 function additionalTests() {
49 runGlobalTest('document', document
);
50 runGlobalTest('html', document
.documentElement
);
51 runGlobalTest('body', document
.body
);