OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <script src="../../js/resources/js-test-pre.js"></script> |
| 5 <script src="../resources/common.js"></script> |
| 6 </head> |
| 7 <body> |
| 8 <p id="description"></p> |
| 9 <select id="test" disabled size=3"> |
| 10 <option selected>foo1</option> |
| 11 <option>foo2</option> |
| 12 <option>foo3</option> |
| 13 <option>foo4</option> |
| 14 <option>foo5</option> |
| 15 </select> |
| 16 |
| 17 |
| 18 <div id="result">Success if onchange was not fired.</div> |
| 19 <div id="console"></div> |
| 20 <script> |
| 21 description('Test that scrolling the listbox does not fire onchange event'); |
| 22 |
| 23 function handleChange() { |
| 24 $('result').textContent = 'Failed. A disabled select should not fire onchang
e event.'; |
| 25 } |
| 26 |
| 27 $('test').addEventListener('change', handleChange); |
| 28 if (!window.eventSender) { |
| 29 debug('Click and drag the select element using the mouse. It should not fire
onchange event.'); |
| 30 } else { |
| 31 mouseMoveToIndexInListbox(1, 'test'); |
| 32 eventSender.mouseDown(0); |
| 33 mouseMoveToIndexInListbox(2, 'test'); |
| 34 eventSender.mouseUp(0); |
| 35 } |
| 36 </script> |
| 37 <script src="../../js/resources/js-test-post.js"></script> |
| 38 </html> |
| 39 |
OLD | NEW |