summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/forms/textarea/textarea-wrap-attribute.html
blob: f16c64065ffa5c22fa6e8adce3b12bb9d505ae64 (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
36
37
38
39
40
41
42
43
44
45
46
<!DOCTYPE HTML>
<html>
<head>
<script src="../../../resources/js-test.js"></script>
</head>
<body>
<p id="description"></p>
<div id="console"></div>
<script>
description('HTMLTextAreaElement.wrap reflects the wrap="" attribute.<br>It is not "limited to only known values", and it is a DOMString attribute which means it just returns the content attributes\'s value directly.');


var textArea = document.createElement('textarea');
document.body.appendChild(textArea);

debug('If wrap attribute is not specified it sould be empty String.');
shouldBe('textArea.wrap', "''");

debug('');
debug('Check if it sets warpAttr value hard, should return hard.');
textArea.wrap = "hard";
shouldBe('textArea.wrap', "'hard'");

debug('');
debug('Check if it sets warpAttr value as soft, should return soft.');
textArea.wrap = "soft";
shouldBe('textArea.wrap', "'soft'");

debug('');
debug('Check if warpAttr present but no keyVal specified, should return empty String.');
textArea.wrap = "";
shouldBe('textArea.wrap', "''");

debug('');
debug('Check if it sets warpAttr invaild value, should return foo.');
textArea.wrap = "foo";
shouldBe('textArea.wrap', "'foo'");

debug('');
</script>
</body>
</html>