test_bug1128787-1.html 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <!DOCTYPE HTML>
  2. <html>
  3. <!--
  4. https://bugzilla.mozilla.org/show_bug.cgi?id=1128787
  5. -->
  6. <head>
  7. <meta charset="utf-8">
  8. <title>Test for Bug 1128787</title>
  9. <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
  10. <link rel="stylesheet" type="text/css" href="chrome://global/skin"/>
  11. <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
  12. <script type="application/javascript">
  13. /** Test for Bug 1128787 **/
  14. SimpleTest.waitForExplicitFinish();
  15. window.onload = function (aEvent) {
  16. var blurEventFired = false;
  17. var input = document.getElementsByTagName("input")[0];
  18. input.addEventListener("blur", function (aEvent) {
  19. input.removeEventListener("blur", arguments.callee);
  20. ok(true, "input element gets blur event correctly");
  21. var utils = SpecialPowers.getDOMWindowUtils(window);
  22. is(utils.IMEStatus, utils.IME_STATUS_ENABLED, "IME should be enabled");
  23. SimpleTest.executeSoon(function () {
  24. document.designMode = "off";
  25. // XXX Should be fixed.
  26. todo_is(utils.IMEStatus, utils.IME_STATUS_DISABLED, "IME should be disabled");
  27. SimpleTest.finish();
  28. });
  29. });
  30. document.designMode = "on";
  31. }
  32. </script>
  33. </head>
  34. <body>
  35. <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1128787">Mozilla Bug 1128787</a>
  36. <p id="display"></p>
  37. <div id="content" style="display: none">
  38. </div>
  39. <input type="button"/>
  40. <script>
  41. var input = document.getElementsByTagName("input")[0];
  42. input.focus();
  43. </script>
  44. <pre id="test">
  45. </pre>
  46. </body>
  47. </html>