OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <body> |
| 4 <script src="../../js/resources/js-test-pre.js"></script> |
| 5 <select id="select1" multiple size="4"> |
| 6 <option>1</option> |
| 7 <option>2</option> |
| 8 <option>3</option> |
| 9 <option>4</option> |
| 10 <option>5</option> |
| 11 <option>6</option> |
| 12 <option>7</option> |
| 13 <option>8</option> |
| 14 </select> |
| 15 |
| 16 <script> |
| 17 description('Click on a listbox scrollbar should not dispatch change evnet.'); |
| 18 jsTestIsAsync = true; |
| 19 var select1 = document.getElementById('select1'); |
| 20 var changeEventCounter = 0; |
| 21 select1.onchange = function() { |
| 22 testFailed('A change event was dispatched.'); |
| 23 ++changeEventCounter; |
| 24 } |
| 25 |
| 26 window.onload = function() { |
| 27 if (!window.eventSender) |
| 28 debug('Click on the scrollbar. The test passes if nothing is printed.'); |
| 29 else { |
| 30 eventSender.mouseMoveTo(select1.offsetLeft + select1.offsetWidth - 2, se
lect1.offsetTop + select1.offsetHeight - 2); |
| 31 eventSender.mouseDown(); |
| 32 eventSender.mouseUp(); |
| 33 shouldBe('select1.selectedIndex', '-1'); |
| 34 shouldBe('changeEventCounter', '0'); |
| 35 finishJSTest(); |
| 36 } |
| 37 }; |
| 38 </script> |
| 39 |
| 40 <script src="../../js/resources/js-test-post.js"></script> |
| 41 </html> |
OLD | NEW |