| var widthBefore = document.getElementById("select").offsetWidth; |
| document.getElementById("select").setAttribute("style", "font-size: 32px"); |
| var widthAfter = document.getElementById("select").offsetWidth; |
| if (widthAfter - widthBefore > 20) |
| document.getElementById("result").innerHTML = "PASS: Resize seems to have worked."; |
| document.getElementById("result").innerHTML = "FAIL: Size is not enough bigger after the style change."; |
| <p>This test checks to see if changing the font of a select element causes it to resize to accomodate the larger text.</p> |
| <p><select id="select" style="font-size: 9px"> |
| <option>This is an option with some text in it.</option> |