| <!DOCTYPE html> |
| <html> |
| <head> |
| <script src="../../../resources/js-test.js"></script> |
| <script src="../resources/common.js"></script> |
| </head> |
| <body> |
| <p id="description"></p> |
| <select id="test" disabled size=3"> |
| <option selected>foo1</option> |
| <option>foo2</option> |
| <option>foo3</option> |
| <option>foo4</option> |
| <option>foo5</option> |
| </select> |
| |
| |
| <div id="result">Success if onchange was not fired.</div> |
| <div id="console"></div> |
| <script> |
| description('Test that scrolling the listbox does not fire onchange event'); |
| |
| function handleChange() { |
| $('result').textContent = 'Failed. A disabled select should not fire onchange event.'; |
| } |
| |
| $('test').addEventListener('change', handleChange); |
| if (!window.eventSender) { |
| debug('Click and drag the select element using the mouse. It should not fire onchange event.'); |
| } else { |
| mouseMoveToIndexInListbox(1, 'test'); |
| eventSender.mouseDown(0); |
| mouseMoveToIndexInListbox(2, 'test'); |
| eventSender.mouseUp(0); |
| } |
| </script> |
| </html> |
| |