2 <select multiple size=
5 onchange=
"change()"><option>1</option><option>2</option></select>
7 var select
= document
.forms
[0].elements
[0];
8 var res
= document
.getElementById("res");
10 if (window
.testRunner
) {
11 testRunner
.dumpAsText();
12 eventSender
.keyDown("downArrow", []);
13 eventSender
.keyDown("downArrow", ["shiftKey"]);
15 res
.textContent
= "Press down arrow.";
19 if (select
.firstChild
.selected
&& !select
.firstChild
.nextSibling
.selected
) {
20 select
.appendChild(new Option("3", "3", false, false));
21 res
.textContent
= "Press shift + down arrow.";
22 } else if (select
.firstChild
.selected
&& select
.firstChild
.nextSibling
.selected
&& !select
.lastChild
.selected
)
23 res
.textContent
= "Success.";
25 res
.textContent
= "Failed.";