summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/forms/method-attribute.html
blob: f0eb9766d54a2728c3114f03d8bcda7e9615cb7d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<!DOCTYPE html>
<html>
<body>
<script src="../../resources/js-test.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>
</body>
</html>