test_bug299673-2.html 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <html>
  2. <!--
  3. https://bugzilla.mozilla.org/show_bug.cgi?id=299673
  4. -->
  5. <head>
  6. <title>Test #2 for Bug 299673</title>
  7. <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
  8. <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
  9. <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
  10. </head>
  11. <body id="Body">
  12. <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=299673">Mozilla Bug 299673</a>
  13. <p id="display">
  14. <SELECT id="Select1" onchange="log(event); OpenWindow()" onfocus="log(event); " onblur="log(event)">
  15. <OPTION selected>option1</OPTION>
  16. <OPTION>option2</OPTION>
  17. <OPTION>option3</OPTION>
  18. </SELECT>
  19. <INPUT id="Text1" type="text" onfocus="log(event)" onblur="log(event)">
  20. <INPUT id="Text2" type="text" onfocus="log(event)" onblur="log(event)">
  21. </p>
  22. <div id="content" style="display: none">
  23. </div>
  24. <pre id="test">
  25. <script src="bug299673.js"></script>
  26. <script class="testbody" type="text/javascript">
  27. /** Test #2 for Bug 299673 **/
  28. function doTest(expectedEventLog) {
  29. var eventLogForNewTab = '\
  30. : Test with browser.link.open_newwindow = 3\n\
  31. : focus top-doc\n\
  32. SELECT(Select1): focus \n\
  33. SELECT(Select1): change \n\
  34. : >>> OpenWindow\n\
  35. : blur top-doc\n\
  36. : focus popup-doc\n\
  37. INPUT(popupText1): focus \n\
  38. : <<< OpenWindow\n\
  39. SELECT(Select1): blur \n\
  40. INPUT(popupText1): blur \n\
  41. : blur popup-doc\n\
  42. : focus top-doc\n\
  43. '
  44. setPrefAndDoTest(eventLogForNewTab,'Body',3); // 3 = open new window as tab
  45. }
  46. todo(false, "Please write a test for bug 299673 that actually works, see bug 553417");
  47. </script>
  48. </pre>
  49. </body>
  50. </html>