4 if (window
.testRunner
) {
5 testRunner
.dumpAsText();
6 testRunner
.waitUntilDone();
11 var s1
= document
.getElementById("s1");
15 var s2
= document
.getElementById("s2");
18 document
.body
.offsetTop
;
21 var s3
= document
.getElementById("s3");
30 function reportResults()
32 var selected1
= s1
.selectedIndex
;
33 var selected2
= s2
.selectedIndex
;
34 var selected3
= s3
.selectedIndex
;
35 document
.getElementById("test").innerHTML
= "<ul>" +
36 "<li>Changing the size of a select element from 5 to 1 and back 5 should acquire selection of the first item: " + (selected1
== 0 ? "PASS" : "FAIL") +
37 "<li>Forcing layout should not affect the outcome: " + (selected2
== selected1
? "PASS" : "FAIL") +
38 "<li>And neither should dropping out of the message loop: " + (selected3
== selected1
? "PASS" : "FAIL") +
41 if (window
.testRunner
)
42 testRunner
.notifyDone();
46 <body onload=
"runTest()">
48 <select id=
"s1" size=
"5"><option>test
</select>
49 <select id=
"s2" size=
"5"><option>test
</select>
50 <select id=
"s3" size=
"5"><option>test
</select>