| <html> |
| <body> |
| <form> |
| <input id="inputElement" size="4"> |
| </form> |
| <p> |
| This tests to make sure that HTMLInputElement::size returns a number, not a string. This is in violation of the DOM Level 1 spec, but is what FireFox does, so we match. |
| </p> |
| You should see 2 lines with "SUCCESS" below: |
| <script> |
| if (window.testRunner) |
| testRunner.dumpAsText(); |
| |
| function checkExpected(actual, expected) |
| { |
| if (actual != expected) |
| document.writeln("<p>FAILURE: expected \"" + expected + "\", actual \"" + actual + "\"</p>"); |
| else |
| document.writeln("<p>SUCCESS (value: \"" + actual + "\")</p>"); |
| } |
| |
| var inputElement = document.getElementById("inputElement"); |
| checkExpected(typeof(inputElement.size), "number"); |
| checkExpected(inputElement.size + 5, 9); |
| </script> |
| </body> |
| </html> |