test_bug393269.html 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <!DOCTYPE HTML>
  2. <html>
  3. <!--
  4. https://bugzilla.mozilla.org/show_bug.cgi?id=393269
  5. -->
  6. <head>
  7. <title>Test for Bug 393269</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=393269">Mozilla Bug 393269</a>
  13. <iframe id="ifr"></iframe>
  14. <pre id="test">
  15. <script class="testbody" type="text/javascript">
  16. (function () {
  17. /** Test for Bug 393269 **/
  18. var doc = $("ifr").contentDocument;
  19. is("UTF-8", doc.characterSet, "control, getting a property");
  20. doc.open();
  21. try {
  22. is("UTF-8", doc.characterSet,
  23. "can get a property after 1 document.open")
  24. } catch (e) {
  25. fail("Shouldn't have thrown: " + e);
  26. return;
  27. } finally {
  28. doc.close();
  29. }
  30. doc.open();
  31. try {
  32. is("UTF-8", doc.characterSet,
  33. "can get a property after 2 document.opens")
  34. } catch (e) {
  35. fail("Shouldn't have thrown: " + e);
  36. } finally {
  37. doc.close();
  38. }
  39. })();
  40. </script>
  41. </pre>
  42. </body>
  43. </html>