Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / formmethod-attribute-test.html
blob66823eeedf526f315261b078ce2e1299f17190c5
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <script src="../../resources/js-test.js"></script>
6 <p>Test formmethod attribute</p>
8 <form id=f1 method="post">
9 <input type="submit" value="Submit" id="ip1">
10 <input type="submit" formmethod="" value="Submit" id="ip2">
11 <input type="submit" formmethod="post" value="Submit" id="ip3">
12 <input type="submit" formmethod="get" value="Submit" id="ip4">
13 <input type="submit" formmethod="foo" value="Submit" id="ip5">
14 </form>
15 <div id=console></div>
16 <script>
17 var form1 = document.getElementById('f1');
19 debug('Missing value');
20 var ip1 = document.getElementById('ip1');
21 shouldBeEqualToString("ip1.formMethod","");
22 shouldBeNull("ip1.getAttribute('formmethod')");
23 debug('');
25 debug('Empty value');
26 var ip2 = document.getElementById('ip2');
27 shouldBeEqualToString("ip2.formMethod", "get");
28 shouldBeEqualToString("ip2.getAttribute('formmethod')", "");
29 debug('');
31 debug('Post value');
32 var ip3 = document.getElementById('ip3');
33 shouldBeEqualToString("ip3.formMethod", "post");
34 shouldBeEqualToString("ip3.getAttribute('formmethod')", "post");
35 debug('');
37 debug('Get value');
38 var ip4 = document.getElementById('ip4');
39 shouldBeEqualToString("ip4.formMethod", "get");
40 shouldBeEqualToString("ip4.getAttribute('formmethod')", "get");
41 debug('');
43 debug('Invalid value');
44 var ip5 = document.getElementById('ip5');
45 shouldBeEqualToString("ip5.formMethod", "get");
46 shouldBeEqualToString("ip5.getAttribute('formmethod')", "foo");
47 debug('');
48 </script>
49 </body>
50 </html>