| OLD | NEW |
| 1 description("This tests what mouse events we send."); | 1 description("This tests what mouse events we send."); |
| 2 | 2 |
| 3 var div = document.createElement("div"); | 3 var div = document.createElement("div"); |
| 4 div.style.width = "100px"; | 4 div.style.width = "100px"; |
| 5 div.style.height = "100px"; | 5 div.style.height = "100px"; |
| 6 div.style.backgroundColor = "blue"; | 6 div.style.backgroundColor = "blue"; |
| 7 | 7 |
| 8 var eventLog = ""; | 8 var eventLog = ""; |
| 9 | 9 |
| 10 function appendEventLog() { | 10 function appendEventLog() { |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 | 42 |
| 43 function testEvents(description, button, expectedString) { | 43 function testEvents(description, button, expectedString) { |
| 44 debug(description); | 44 debug(description); |
| 45 sendEvents(button); | 45 sendEvents(button); |
| 46 shouldBeEqualToString("eventLog", expectedString); | 46 shouldBeEqualToString("eventLog", expectedString); |
| 47 clearEventLog(); | 47 clearEventLog(); |
| 48 } | 48 } |
| 49 | 49 |
| 50 if (window.eventSender) { | 50 if (window.eventSender) { |
| 51 testEvents("Left Mouse Button", 0, "mousedown(0) mouseup(0) click(0) mousedo
wn(0) mouseup(0) click(0) dblclick(0) "); | 51 testEvents("Left Mouse Button", 0, "mousedown(0) mouseup(0) click(0) mousedo
wn(0) mouseup(0) click(0) dblclick(0) "); |
| 52 testEvents("Middle Mouse Button", 1, "mousedown(1) mouseup(1) mousedown(1) m
ouseup(1) "); | 52 testEvents("Middle Mouse Button", 1, "mousedown(1) mouseup(1) click(1) mouse
down(1) mouseup(1) click(1) dblclick(1) "); |
| 53 testEvents("Right Mouse Button", 2, "mousedown(2) mouseup(2) mousedown(2) mo
useup(2) "); | 53 testEvents("Right Mouse Button", 2, "mousedown(2) mouseup(2) mousedown(2) mo
useup(2) "); |
| 54 } | 54 } |
| OLD | NEW |