test_bug838582.html 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  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 type="application/javascript" 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. </div>
  17. <pre id="test">
  18. <textarea id="t">abc</textarea>
  19. <script type="application/javascript">
  20. /** Test for Bug 838582 **/
  21. var textarea = document.getElementById("t");
  22. is(t.textLength, 3, "Correct textLength for defaultValue");
  23. t.value = "abcdef";
  24. is(t.textLength, 6, "Correct textLength for value");
  25. ok(!("controllers" in t), "Don't have web-visible controllers property");
  26. ok("controllers" in SpecialPowers.wrap(t), "Have chrome-visible controllers property");
  27. </script>
  28. </pre>
  29. </body>
  30. </html>