4 <script src=
"../../resources/js-test.js"></script>
6 <p>Test method and formmethod attributes
</p>
10 <div id=console
></div>
12 var form1
= document
.getElementById('f1');
14 debug('Missing value default:');
15 shouldBe('form1.method', '"get"');
16 shouldBeNull('form1.getAttribute("method")');
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"');
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"');