blob: c0e1291a45a7146780e838849bf482d8d036dd4a [file] [log] [blame]
adeleedf44912007-01-17 21:01:34 +00001<html>
2 <head>
3 <script>
4 function test() {
rniwa@webkit.orgea3cf922012-06-22 06:52:33 +00005 if (window.testRunner)
6 testRunner.waitUntilDone();
adeleedf44912007-01-17 21:01:34 +00007
8 setTimeout('addLongOption();', 100);
9 }
10 function addLongOption()
11 {
12 var newOpt = document.createElement("option");
13 newOpt.appendChild(document.createTextNode("I require more room"));
14 var sl = document.getElementById("t");
15 sl.appendChild(newOpt);
16
rniwa@webkit.orgea3cf922012-06-22 06:52:33 +000017 if (window.testRunner)
18 testRunner.notifyDone();
adeleedf44912007-01-17 21:01:34 +000019 }
20 </script>
21 </head>
22 <body onload="test()">
23 This tests that when an option is dynamically added to a menu list, and it is too long for the current width,<br>
24 that the select automatically recalculates the correct width.<br>
25 <select id="t">
26 <option id="short">Short</option>
27 <option id="medium">Medium</option>
28 </select>
29 <div id="res"></div>
30 </body>
31</html>