Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / js / text-field-resize.html
blob1bfb3a23867b46077b3bf0d7f4370c6f0ffe8665
1 <HTML>
2 <HEAD>
3 <SCRIPT>
4 if (window.testRunner)
5 testRunner.dumpAsText();
7 function log(s)
9 document.getElementById("console").appendChild(document.createTextNode(s));
10 document.getElementById("console").appendChild(document.createElement("br"));
13 function resize() {
14 var input_field_width_before_resize = document.getElementById('success').clientWidth;
15 document.getElementById('success').size=30;
16 var input_field_width_after_resize = document.getElementById('success').clientWidth;
17 if(input_field_width_after_resize > input_field_width_before_resize) {
18 log("SUCCESS");
19 } else {
20 log("FAIL");
22 input_field_width_before_resize = document.getElementById('success').clientWidth;
23 document.getElementById('success').setAttribute("size", 40);
24 input_field_width_after_resize = document.getElementById('success').clientWidth;
25 if(input_field_width_after_resize > input_field_width_before_resize) {
26 log("SUCCESS");
27 } else {
28 log("FAIL");
31 </SCRIPT>
32 </HEAD>
33 <BODY onLoad="resize();">
34 <span id="console"></span>
35 <input type="text" id="success" size="2">
36 </BODY>
37 </HTML>