test_bug381167.xhtml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <html xmlns="http://www.w3.org/1999/xhtml" xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
  2. <!--
  3. https://bugzilla.mozilla.org/show_bug.cgi?id=381167
  4. -->
  5. <head>
  6. <title>Test for Bug 381167</title>
  7. <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
  8. <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
  9. </head>
  10. <body>
  11. <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=381167">Mozilla Bug 381167</a>
  12. <p id="display"></p>
  13. <div id="content" style="display: none">
  14. </div>
  15. <xul:tree>
  16. <xul:tree>
  17. <xul:treechildren/>
  18. <xul:treecol/>
  19. </xul:tree>
  20. </xul:tree>
  21. <pre id="test">
  22. <script type="application/javascript">
  23. /** Test for Bug 381167 **/
  24. SimpleTest.waitForExplicitFinish();
  25. function closeit() {
  26. var evt = document.createEvent('KeyboardEvent');
  27. evt.initKeyEvent('keypress', true, true,
  28. window,
  29. true, false, false, false,
  30. 'W'.charCodeAt(0), 0);
  31. window.dispatchEvent(evt);
  32. setTimeout(finish, 200);
  33. }
  34. window.addEventListener('load', closeit, false);
  35. function finish()
  36. {
  37. ok(true, "This is a mochikit version of a crash test. To complete is to pass.");
  38. SimpleTest.finish();
  39. }
  40. </script>
  41. </pre>
  42. </body>
  43. </html>