Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / select / listbox-disabled-scroll-no-onchange.html
blob22113bf0e3455fc54681a42554e0a871feafc7e1
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../../resources/js-test.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>
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');
23 function handleChange() {
24 $('result').textContent = 'Failed. A disabled select should not fire onchange event.';
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);
36 </script>
37 </html>