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>
14 <div id=
"result">FAIL
</div>
15 <div id=
"console"></div>
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.');
28 mouseMoveToIndexInListbox(1, 'select1');
29 eventSender
.mouseDown(0);
30 mouseMoveToIndexInListbox(2, 'select1');
31 eventSender
.mouseUp(0);