Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / select / listbox-drag-in-non-multiple.html
blob7c22774d2ad369cba7adedb9506ecce4f1987c74
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <script src="../../../resources/js-test.js"></script>
5 <script src="../resources/common.js"></script>
7 <p id="description"></p>
8 <select id="select1" size="4">
9 <option>Option1</option>
10 <option>Option2</option>
11 <option>Option3</option>
12 <option>Option4</option>
13 </select>
14 <div id="result">FAIL</div>
15 <div id="console"></div>
17 <script>
18 description('Test if \'change\' event is dispatched when selecting an item by mouse dragging in a non-multiple listbox.');
20 function handleChange() {
21 $('result').textContent = 'PASS: A click event was dispatched.';
23 $('select1').addEventListener('change', handleChange);
25 if (!window.eventSender) {
26 debug('Press the left button on an item in the listbox, move the pointer to another item, and release the button. You\'ll see a "PASS" message.');
27 } else {
28 mouseMoveToIndexInListbox(1, 'select1');
29 eventSender.mouseDown(0);
30 mouseMoveToIndexInListbox(2, 'select1');
31 eventSender.mouseUp(0);
33 </script>
34 </body>
35 </html>