| OLD | NEW |
| (Empty) |
| 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 n
ot "limited to only known values", and it is a DOMString attribute which means i
t just returns the content attributes\'s value directly.'); | |
| 11 | |
| 12 | |
| 13 var textArea = document.createElement('textarea'); | |
| 14 document.body.appendChild(textArea); | |
| 15 | |
| 16 debug('If wrap attribute is not specified it sould be empty String.'); | |
| 17 shouldBe('textArea.wrap', "''"); | |
| 18 | |
| 19 debug(''); | |
| 20 debug('Check if it sets warpAttr value hard, should return hard.'); | |
| 21 textArea.wrap = "hard"; | |
| 22 shouldBe('textArea.wrap', "'hard'"); | |
| 23 | |
| 24 debug(''); | |
| 25 debug('Check if it sets warpAttr value as soft, should return soft.'); | |
| 26 textArea.wrap = "soft"; | |
| 27 shouldBe('textArea.wrap', "'soft'"); | |
| 28 | |
| 29 debug(''); | |
| 30 debug('Check if warpAttr present but no keyVal specified, should return empty St
ring.'); | |
| 31 textArea.wrap = ""; | |
| 32 shouldBe('textArea.wrap', "''"); | |
| 33 | |
| 34 debug(''); | |
| 35 debug('Check if it sets warpAttr invaild value, should return foo.'); | |
| 36 textArea.wrap = "foo"; | |
| 37 shouldBe('textArea.wrap', "'foo'"); | |
| 38 | |
| 39 debug(''); | |
| 40 </script> | |
| 41 </body> | |
| 42 </html> | |
| 43 | |
| 44 | |
| 45 | |
| 46 | |
| OLD | NEW |