OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <link rel="stylesheet" href="resources/compositor-touch-hit-rects.css"> |
| 5 <style> |
| 6 body { |
| 7 /* make it easy to validate rects are covering the entire document */ |
| 8 height: 1968px; |
| 9 margin: 16px 5px; |
| 10 } |
| 11 </style> |
| 12 </head> |
| 13 <body> |
| 14 <p id="description"> |
| 15 This tests verifies the hit test regions given to the compositor in the simple c
ase where |
| 16 touch handles cover (or nearly cover) the entire document. It can only be run in
DumpRenderTree. |
| 17 </p> |
| 18 |
| 19 <div id="tests"> |
| 20 </div> |
| 21 |
| 22 <div id="console"></div> |
| 23 <script src="resources/compositor-touch-hit-rects.js"></script> |
| 24 <script> |
| 25 |
| 26 function runGlobalTest(name, element) { |
| 27 // With a global handler, no other handlers should matter |
| 28 var elements = [document.getElementById('description'), element, document.getE
lementById('tests')]; |
| 29 for (var i = 0; i < elements.length; i++) |
| 30 elements[i].addEventListener('touchmove', listener, false); |
| 31 |
| 32 logRects(name, true); |
| 33 |
| 34 for (var i = 0; i < elements.length; i++) |
| 35 elements[i].removeEventListener('touchmove', listener, false); |
| 36 } |
| 37 |
| 38 function additionalTests() { |
| 39 runGlobalTest('document', document); |
| 40 runGlobalTest('html', document.documentElement); |
| 41 runGlobalTest('body', document.body); |
| 42 } |
| 43 </script> |
| 44 </body> |
OLD | NEW |