| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <meta http-equiv="content-type" content="text/html; charset=UTF-8"> |
| 4 <style type="text/css"> |
| 5 .big { |
| 6 font-size: 70px; |
| 7 } |
| 8 </style> |
| 3 <script> | 9 <script> |
| 4 function test() { | 10 function test() { |
| 5 if (window.testRunner) | 11 if (window.testRunner) |
| 6 testRunner.waitUntilDone(); | 12 testRunner.waitUntilDone(); |
| 7 | 13 |
| 8 setTimeout('addLongOption();', 100); | 14 setTimeout('addLargeFontSizeOption();', 100); |
| 9 } | 15 } |
| 10 function addLongOption() | 16 function addLargeFontSizeOption() |
| 11 { | 17 { |
| 12 var newOpt = document.createElement("option"); | 18 var newOpt = document.createElement("option"); |
| 13 newOpt.appendChild(document.createTextNode("I require more room"
)); | 19 newOpt.appendChild(document.createTextNode("Large Text")); |
| 20 newOpt.className = "big"; |
| 14 var sl = document.getElementById("t"); | 21 var sl = document.getElementById("t"); |
| 15 sl.appendChild(newOpt); | 22 sl.appendChild(newOpt); |
| 16 | 23 |
| 17 if (window.testRunner) | 24 if (window.testRunner) |
| 18 testRunner.notifyDone(); | 25 testRunner.notifyDone(); |
| 19 } | 26 } |
| 20 </script> | 27 </script> |
| 21 </head> | 28 </head> |
| 22 <body onload="test()"> | 29 <body onload="test()"> |
| 23 This tests that when an option is dynamically added to a menu list, and it i
s too long for the current width,<br> | 30 This tests that when an option is dynamically added to a menu list, and it i
s too big for the current height,<br> |
| 24 that the select automatically recalculates the correct width.<br> | 31 that the select automatically recalculates the correct height.<br> |
| 25 <select id="t"> | 32 <select id="t"> |
| 26 <option id="short">Short</option> | 33 <option>Normal text</option> |
| 27 <option id="medium">Medium</option> | |
| 28 </select> | 34 </select> |
| 29 <div id="res"></div> | 35 <div id="res"></div> |
| 30 </body> | 36 </body> |
| 31 </html> | 37 </html> |
| OLD | NEW |