OLD | NEW |
---|---|
(Empty) | |
1 <html> | |
2 <body> | |
3 <script src="../../../resources/js-test.js"></script> | |
4 <select id="listBoxSelect" size="5" multiple="multiple"> | |
5 <option value="option 1">Option 1</option> | |
6 <option value="option 2">Option 2</option> | |
7 <option value="option 3">Option 3</option> | |
8 <option value="option 4">Option 4</option> | |
9 <option value="option 5">Option 5</option> | |
10 </select> | |
11 <script> | |
12 description('should dispatch change event when mouse is released outside.'); | |
13 jsTestIsAsync = true; | |
14 var select = document.getElementById('listBoxSelect'); | |
15 select.onchange = function() { | |
16 testPassed('A change event was dispatched.'); | |
17 } | |
18 | |
19 window.onload = function() | |
20 { | |
21 if (!window.eventSender) | |
22 debug('Select listbox using mouse and release the mouse pointer outside the listbox. The test passes if "A change event was dispatched." is printed.'); | |
23 else { | |
24 var x = select.offsetLeft + 7; | |
25 var y = select.offsetTop + 7; | |
26 eventSender.dragMode = false; | |
27 eventSender.mouseMoveTo(x, y); | |
28 eventSender.mouseDown(); | |
29 eventSender.mouseMoveTo(x, y + 20); | |
30 eventSender.mouseMoveTo(x, y + 600); | |
31 eventSender.mouseUp(); | |
32 setTimeout(HorizontalTest, 100); | |
gnana
2014/01/07 08:35:19
Before running horizontal test we need to give a d
| |
33 } | |
34 } | |
35 function HorizontalTest() | |
36 { | |
37 var x = select.offsetLeft + 7; | |
38 var y = select.offsetTop + 7; | |
39 eventSender.dragMode = false; | |
40 eventSender.mouseMoveTo(x, y); | |
41 eventSender.mouseDown(); | |
42 eventSender.mouseMoveTo(x + 20, y); | |
43 eventSender.mouseMoveTo(x + 600, y); | |
44 eventSender.mouseUp(); | |
45 finishJSTest(); | |
46 } | |
47 </script> | |
48 </body> | |
49 </html> | |
OLD | NEW |