| OLD | NEW |
| 1 function createSquareCompositedHighlight(node) | 1 function createSquareCompositedHighlight(node) |
| 2 { | 2 { |
| 3 return _createHighlight(node, "squaredHighlight highlightDiv composited"); | 3 return _createHighlight(node, "squaredHighlight highlightDiv composited"); |
| 4 } | 4 } |
| 5 | 5 |
| 6 function createCompositedHighlight(node) | 6 function createCompositedHighlight(node) |
| 7 { | 7 { |
| 8 return _createHighlight(node, "highlightDiv composited"); | 8 return _createHighlight(node, "highlightDiv composited"); |
| 9 } | 9 } |
| 10 | 10 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 div.style.height = clientRect.height + "px"; | 26 div.style.height = clientRect.height + "px"; |
| 27 | 27 |
| 28 return div; | 28 return div; |
| 29 } | 29 } |
| 30 | 30 |
| 31 function useMockHighlight() { | 31 function useMockHighlight() { |
| 32 if (window.internals) | 32 if (window.internals) |
| 33 internals.settings.setMockGestureTapHighlightsEnabled(true); | 33 internals.settings.setMockGestureTapHighlightsEnabled(true); |
| 34 } | 34 } |
| 35 | 35 |
| 36 function testHighlightTarget(id) { |
| 37 useMockHighlight(); |
| 38 |
| 39 var clientRect = document.getElementById('highlightTarget').getBoundingClien
tRect(); |
| 40 x = (clientRect.left + clientRect.right) / 2; |
| 41 y = (clientRect.top + clientRect.bottom) / 2; |
| 42 if (window.testRunner) { |
| 43 testRunner.dumpAsTextWithPixelResults(); |
| 44 testRunner.waitUntilDone(); |
| 45 } |
| 46 |
| 47 if (window.eventSender) { |
| 48 eventSender.gestureTapDown(x, y, 30, 30); |
| 49 eventSender.gestureShowPress(x, y, 30, 30); |
| 50 window.setTimeout(function() { window.testRunner.notifyDone(); }, 0); |
| 51 } else { |
| 52 debug("This test requires eventSender"); |
| 53 } |
| 54 } |
| OLD | NEW |