test_bug386996.html 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <!DOCTYPE HTML>
  2. <html>
  3. <!--
  4. https://bugzilla.mozilla.org/show_bug.cgi?id=386996
  5. -->
  6. <head>
  7. <title>Test for Bug 386996</title>
  8. <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
  9. <script type="text/javascript" src="/tests/SimpleTest/EventUtils.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=386996">Mozilla Bug 386996</a>
  14. <p id="display"></p>
  15. <div id="content">
  16. <input id="input1"><input disabled><input id="input2">
  17. </div>
  18. <pre id="test">
  19. <script class="testbody" type="text/javascript">
  20. /** Test for Bug 386996 **/
  21. var frame = document.getElementById("testIframe");
  22. function testContentEditable() {
  23. var focusedElement;
  24. document.getElementById("input1").onfocus = function() { focusedElement = this };
  25. document.getElementById("input2").onfocus = function() { focusedElement = this };
  26. document.getElementById("input1").focus();
  27. synthesizeKey("VK_TAB", {});
  28. is(focusedElement.id, "input2");
  29. }
  30. SimpleTest.waitForExplicitFinish();
  31. addLoadEvent(testContentEditable);
  32. addLoadEvent(SimpleTest.finish);
  33. </script>
  34. </pre>
  35. </body>
  36. </html>