Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / method-attribute.html
blobf0eb9766d54a2728c3114f03d8bcda7e9615cb7d
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <script src="../../resources/js-test.js"></script>
6 <p>Test method and formmethod attributes</p>
8 <form id=f1></form>
10 <div id=console></div>
11 <script>
12 var form1 = document.getElementById('f1');
14 debug('Missing value default:');
15 shouldBe('form1.method', '"get"');
16 shouldBeNull('form1.getAttribute("method")');
18 debug('');
19 debug('Invalid value default:');
20 shouldBe('form1.method = " post "; form1.method', '"get"');
21 shouldBe('form1.getAttribute("method")', '" post "');
22 shouldBe('form1.setAttribute("method", "put"); form1.method', '"get"');
24 debug('');
25 debug('Valid values:');
26 shouldBe('form1.method = "Post"; form1.method', '"post"');
27 shouldBe('form1.getAttribute("method")', '"Post"');
29 shouldBe('form1.method = "Get"; form1.method', '"get"');
30 shouldBe('form1.getAttribute("method")', '"Get"');
32 debug('');
33 </script>
34 </body>
35 </html>