blob: e766daba423565551c1d67dc674aef50ccc625b2 [file] [log] [blame]
<!DOCTYPE html>
<html>
<body>
<script src="../js/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="../js/resources/js-test-post.js"></script>
</body>
</html>