| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <title>Test case for Bugzilla 7790</title> | 3 <title>Test case for Bugzilla 7790</title> |
| 4 <style> | 4 <style> |
| 5 .testarea | 5 .testarea |
| 6 { | 6 { |
| 7 background: red; | 7 background: red; |
| 8 width: 100px; | 8 width: 100px; |
| 9 height: 100px; | 9 height: 100px; |
| 10 color: white; | 10 color: white; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 event.stopPropagation(); | 21 event.stopPropagation(); |
| 22 event.preventDefault(); | 22 event.preventDefault(); |
| 23 } | 23 } |
| 24 window.onload = function() | 24 window.onload = function() |
| 25 { | 25 { |
| 26 var elem = document.getElementById("click_area"); | 26 var elem = document.getElementById("click_area"); |
| 27 elem.addEventListener('dblclick', handler, false); | 27 elem.addEventListener('dblclick', handler, false); |
| 28 | 28 |
| 29 if (window.testRunner) { | 29 if (window.testRunner) { |
| 30 testRunner.dumpAsText(); | 30 testRunner.dumpAsText(); |
| 31 // Mouse events only work after an initial layout |
| 32 document.body.offsetLeft; |
| 31 eventSender.mouseMoveTo(50,50); | 33 eventSender.mouseMoveTo(50,50); |
| 32 eventSender.mouseDown(); | 34 eventSender.mouseDown(); |
| 33 eventSender.mouseUp(); | 35 eventSender.mouseUp(); |
| 34 eventSender.mouseDown(); | 36 eventSender.mouseDown(); |
| 35 eventSender.mouseUp(); | 37 eventSender.mouseUp(); |
| 36 } | 38 } |
| 37 } | 39 } |
| 38 </script> | 40 </script> |
| 39 </head> | 41 </head> |
| 40 <body> | 42 <body> |
| 41 <div id="click_area" class="testarea">FAILURE, no dblclick recieved</div> | 43 <div id="click_area" class="testarea">FAILURE, no dblclick recieved</div> |
| 42 <br> | 44 <br> |
| 43 <p>Double-click above to test.</p> | 45 <p>Double-click above to test.</p> |
| 44 </body> | 46 </body> |
| 45 </html> | 47 </html> |
| OLD | NEW |