test_bug838582.html (1009B)
1 <!DOCTYPE HTML> 2 <html> 3 <!-- 4 https://bugzilla.mozilla.org/show_bug.cgi?id=838582 5 --> 6 <head> 7 <title>Test for Bug 838582</title> 8 <script src="/tests/SimpleTest/SimpleTest.js"></script> 9 <script type="application/javascript" src="reflect.js"></script> 10 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> 11 </head> 12 <body> 13 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=838582">Mozilla Bug 838582</a> 14 <p id="display"></p> 15 <div id="content" style="display: none"> 16 17 </div> 18 <pre id="test"> 19 <textarea id="t">abc</textarea> 20 <script type="application/javascript"> 21 22 /** Test for Bug 838582 */ 23 24 var textarea = document.getElementById("t"); 25 26 is(t.textLength, 3, "Correct textLength for defaultValue"); 27 t.value = "abcdef"; 28 is(t.textLength, 6, "Correct textLength for value"); 29 ok(!("controllers" in t), "Don't have web-visible controllers property"); 30 ok("controllers" in SpecialPowers.wrap(t), "Have chrome-visible controllers property"); 31 32 </script> 33 </pre> 34 </body> 35 </html>