Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / textarea-wrap-attribute.html
blob953fae7474cb3df249246753688812caed1d723c
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 </head>
6 <body>
7 <p id="description"></p>
8 <div id="console"></div>
9 <script>
10 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.');
13 var textArea = document.createElement('textarea');
14 document.body.appendChild(textArea);
16 debug('If wrap attribute is not specified it sould be empty String.');
17 shouldBe('textArea.wrap', "''");
19 debug('');
20 debug('Check if it sets warpAttr value hard, should return hard.');
21 textArea.wrap = "hard";
22 shouldBe('textArea.wrap', "'hard'");
24 debug('');
25 debug('Check if it sets warpAttr value as soft, should return soft.');
26 textArea.wrap = "soft";
27 shouldBe('textArea.wrap', "'soft'");
29 debug('');
30 debug('Check if warpAttr present but no keyVal specified, should return empty String.');
31 textArea.wrap = "";
32 shouldBe('textArea.wrap', "''");
34 debug('');
35 debug('Check if it sets warpAttr invaild value, should return foo.');
36 textArea.wrap = "foo";
37 shouldBe('textArea.wrap', "'foo'");
39 debug('');
40 </script>
41 </body>
42 </html>