test_bug567938-4.html 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <!DOCTYPE HTML>
  2. <html>
  3. <!--
  4. https://bugzilla.mozilla.org/show_bug.cgi?id=567938
  5. -->
  6. <head>
  7. <title>Test for Bug 567938</title>
  8. <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
  9. <script type="application/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=567938">Mozilla Bug 567938</a>
  14. <p id="display"></p>
  15. <div id="content" style="display: none">
  16. <input id='i' type='checkbox' onclick="return false;">
  17. </div>
  18. <pre id="test">
  19. <script type="application/javascript">
  20. /** Test for Bug 567938 **/
  21. SimpleTest.waitForExplicitFinish();
  22. addLoadEvent(runTests);
  23. function runTests()
  24. {
  25. document.getElementById('i').checked = false;
  26. document.getElementById('i').addEventListener('click', function(aEvent) {
  27. aEvent.target.removeEventListener('click', arguments.callee, false);
  28. SimpleTest.executeSoon(function() {
  29. ok(!aEvent.target.checked, "the input should not be checked");
  30. SimpleTest.finish();
  31. });
  32. }, false);
  33. sendMouseEvent({type: 'click'}, 'i');
  34. }
  35. </script>
  36. </pre>
  37. </body>
  38. </html>