4 https://bugzilla.mozilla.org/show_bug.cgi?id=563642
7 <title>Test for Bug
563642</title>
8 <script type=
"application/javascript" src=
"/tests/SimpleTest/SimpleTest.js"></script>
9 <script type=
"text/javascript" src=
"/tests/SimpleTest/EventUtils.js"></script>
10 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css"/>
13 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=563642">Mozilla Bug
563642</a>
15 <select id=
"test1" multiple=
"multiple" size=
"1">
16 <option>Item
1</option>
17 <option>Item
2</option>
18 <option>Item
3</option>
19 <option>Item
4</option>
20 <option>Item
5</option>
22 <select id=
"test2" multiple=
"multiple" size=
"1">
23 <option>Item
1</option>
24 <option disabled
>Item
2</option>
25 <option>Item
3</option>
26 <option disabled
>Item
4</option>
27 <option>Item
5</option>
29 <select id=
"test3" multiple=
"multiple"></select>
30 <select id=
"test4" multiple=
"multiple" size=
"1"></select>
32 <div id=
"content" style=
"display: none">
36 <script type=
"application/javascript">
38 /** Test for Bug
563642 **/
40 function pageUpDownTest(id,index) {
41 var elm = document.getElementById(id);
43 elm.selectedIndex =
0;
49 is(elm.selectedIndex, index,
"pageUpDownTest: selectedIndex for " + id +
" is " + index);
52 function upDownTest(id,index) {
53 var elm = document.getElementById(id);
55 elm.selectedIndex =
0;
61 is(elm.selectedIndex, index,
"upDownTest: selectedIndex for " + id +
" is " + index);
65 pageUpDownTest(
"test1",
3);
66 pageUpDownTest(
"test2",
4);
67 pageUpDownTest(
"test3",-
1);
68 pageUpDownTest(
"test4",-
1);
69 upDownTest(
"test1",
3);
70 upDownTest(
"test2",
4);
71 upDownTest(
"test3",-
1);
72 upDownTest(
"test4",-
1);
77 SimpleTest.waitForExplicitFinish();
78 SimpleTest.waitForFocus(runTest)