test_bug812744.html 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <!DOCTYPE HTML>
  2. <html>
  3. <!--
  4. https://bugzilla.mozilla.org/show_bug.cgi?id=812744
  5. -->
  6. <head>
  7. <meta charset="utf-8">
  8. <title>Test for Bug 812744</title>
  9. <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.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=812744">Mozilla Bug 812744</a>
  14. <p id="display"></p>
  15. <div id="content" style="display: none">
  16. <iframe id="f"></iframe>
  17. </div>
  18. <pre id="test">
  19. <script type="application/javascript">
  20. /** Test for Bug 812744 **/
  21. SimpleTest.waitForExplicitFinish();
  22. addLoadEvent(function() {
  23. var f = $("f");
  24. var el = f.contentDocument.documentElement;
  25. f.onload = function() {
  26. el.setAttribute("onmouseleave", "(void 0)");
  27. is(el.onmouseleave.toString(), "function onmouseleave(event) {\n(void 0)\n}",
  28. "Should have a function here");
  29. SimpleTest.finish();
  30. };
  31. f.src = "http://www.example.com/"
  32. });
  33. </script>
  34. </pre>
  35. </body>
  36. </html>