Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / input-widths.html
blob7cc5e6cea33b5801e6556e2defbf9a0a1f7ee5f6
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 </head>
6 <body>
7 <p id="description">Text field types should have the same default widths.</p>
8 <div id="console"></div>
10 <div id=parent>
11 <input type=text id=text>
13 <input type=email id=email>
14 <input type=number id=number>
15 <input type=password id=password>
16 <input type=tel id=tel>
17 <input type=url id=url>
18 </div>
20 <script>
21 var baseWidth = document.getElementById('text').offsetWidth;
23 shouldBe('document.getElementById("email").offsetWidth', 'baseWidth');
24 shouldBe('document.getElementById("number").offsetWidth', 'baseWidth');
25 shouldBe('document.getElementById("password").offsetWidth', 'baseWidth');
26 shouldBe('document.getElementById("tel").offsetWidth', 'baseWidth');
27 shouldBe('document.getElementById("url").offsetWidth', 'baseWidth');
29 // type=search is not tested intentionally.
31 document.getElementById('parent').innerHTML = '';
32 </script>
33 </body>
34 </html>