test_bug428021.html 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <!DOCTYPE HTML>
  2. <html>
  3. <!--
  4. https://bugzilla.mozilla.org/show_bug.cgi?id=428021
  5. -->
  6. <head>
  7. <title>Test for Bug 428021</title>
  8. <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
  9. <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
  10. </head>
  11. <body>
  12. <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=428021">Mozilla Bug 428021</a>
  13. <p id="display"></p>
  14. <div id="content" style="display: none">
  15. </div>
  16. <pre id="test">
  17. <script class="testbody" type="text/javascript">
  18. /** Test for Bug 428021 **/
  19. var rangetter, ransetter;
  20. this.__defineGetter__('x', function() { rangetter = true; });
  21. this.__defineSetter__('x', function(val) { ransetter = true; });
  22. var exn;
  23. try {
  24. e = x;
  25. x = false;
  26. } catch (e) {
  27. exn = e;
  28. }
  29. ok(!exn, "Exception caught: " + exn);
  30. ok(rangetter, "Failed to run getter");
  31. ok(ransetter, "Failed to run setter");
  32. </script>
  33. </pre>
  34. </body>
  35. </html>