OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../resources/js-test.js"></script> |
| 3 <script> |
| 4 if (window.testRunner) |
| 5 testRunner.dumpAsText(); |
| 6 |
| 7 window.onload = function() { |
| 8 if (window.eventSender) { |
| 9 var button = document.getElementById('button'); |
| 10 eventSender.mouseMoveTo(button.offsetLeft + button.offsetWidth / 2, |
| 11 button.offsetTop + button.offsetTop / 2); |
| 12 |
| 13 eventSender.mouseDown(); |
| 14 shouldBeEqualToString('getComputedStyle(button).backgroundColor', 'rgb(0
, 255, 0)'); |
| 15 |
| 16 eventSender.mouseUp(); |
| 17 shouldBeEqualToString('getComputedStyle(button).backgroundColor', 'rgb(0
, 0, 255)'); |
| 18 } |
| 19 }; |
| 20 </script> |
| 21 <style> |
| 22 button { background-color: rgb(0, 0, 255); } |
| 23 button:active { background-color: rgb(0, 255, 0); } |
| 24 </style> |
| 25 <button id="button">button</button> |
| 26 <div id="console"></div> |
OLD | NEW |