| OLD | NEW |
| (Empty) |
| 1 <html> | |
| 2 <script> | |
| 3 | |
| 4 if (window.testRunner) { | |
| 5 testRunner.dumpAsText(); | |
| 6 testRunner.waitUntilDone(); | |
| 7 } | |
| 8 | |
| 9 function runTest() | |
| 10 { | |
| 11 var s1 = document.getElementById("s1"); | |
| 12 s1.size = 5; | |
| 13 s1.size = 1; | |
| 14 | |
| 15 var s2 = document.getElementById("s2"); | |
| 16 s2.size = 5; | |
| 17 // force layout. | |
| 18 document.body.offsetTop; | |
| 19 s2.size = 1; | |
| 20 | |
| 21 var s3 = document.getElementById("s3"); | |
| 22 s3.size = 5; | |
| 23 setTimeout(function() | |
| 24 { | |
| 25 s3.size = 1; | |
| 26 reportResults(); | |
| 27 }, 0); | |
| 28 } | |
| 29 | |
| 30 function reportResults() | |
| 31 { | |
| 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 1 to 5 and back 1 should
acquire selection of the first item: " + (selected1 == 0 ? "PASS" : "FAIL") + | |
| 37 "<li>Forcing layout should not affect the outcome: " + (selected2 == sel
ected1 ? "PASS" : "FAIL") + | |
| 38 "<li>And neither should dropping out of the message loop: " + (selected3
== selected1 ? "PASS" : "FAIL") + | |
| 39 "</ul>"; | |
| 40 | |
| 41 if (window.testRunner) | |
| 42 testRunner.notifyDone(); | |
| 43 } | |
| 44 | |
| 45 </script> | |
| 46 <body onload="runTest()"> | |
| 47 <div id="test"> | |
| 48 <select id="s1" size="1"><option>test</select> | |
| 49 <select id="s2" size="1"><option>test</select> | |
| 50 <select id="s3" size="1"><option>test</select> | |
| 51 </div> | |
| 52 </body> | |
| OLD | NEW |