<!DOCTYPE html>
<html>
<body>
<script src="../../resources/js-test-pre.js"></script>

<p>Test method and formmethod attributes</p>

<form id=f1></form>

<div id=console></div>
<script>
var form1 = document.getElementById('f1');

debug('Missing value default:');
shouldBe('form1.method', '"get"');
shouldBeNull('form1.getAttribute("method")');

debug('');
debug('Invalid value default:');
shouldBe('form1.method = " post "; form1.method', '"get"');
shouldBe('form1.getAttribute("method")', '" post "');
shouldBe('form1.setAttribute("method", "put"); form1.method', '"get"');

debug('');
debug('Valid values:');
shouldBe('form1.method = "Post"; form1.method', '"post"');
shouldBe('form1.getAttribute("method")', '"Post"');

shouldBe('form1.method = "Get"; form1.method', '"get"');
shouldBe('form1.getAttribute("method")', '"Get"');

debug('');
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>
