test_bug347174_xsl.html 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <!DOCTYPE HTML>
  2. <html>
  3. <!--
  4. https://bugzilla.mozilla.org/show_bug.cgi?id=347174
  5. -->
  6. <head>
  7. <title>Test for Bug 347174</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=347174">Mozilla Bug 347174</a>
  13. <p id="display"></p>
  14. <div id="content" style="display: none">
  15. <iframe src="347174transformable.xml" id="iframe"></iframe>
  16. </div>
  17. <pre id="test">
  18. <script class="testbody" type="text/javascript">
  19. /** Test for Bug 347174 **/
  20. // Test of readyState of XML document transformed via XSLT to HTML
  21. // this test passes in IE7
  22. window.readyStateText = [];
  23. function showMessage(msg) {
  24. window.readyStateText.push(msg);
  25. document.getElementById("display").innerHTML = readyStateText.join("<br>");
  26. }
  27. function frameScriptTag(readyState) {
  28. isnot(readyState, "complete", "document.readyState should not be 'complete' when scripts run initially");
  29. showMessage("script tag: " + readyState);
  30. }
  31. function frameLoad(readyState) {
  32. is(readyState, "complete", "document.readyState should be 'complete' on load");
  33. showMessage("load: " + readyState);
  34. SimpleTest.finish();
  35. }
  36. function frameReadyStateChange(readyState) {
  37. showMessage("readyStateChange: " + readyState);
  38. }
  39. function frameDOMContentLoaded(readyState) {
  40. is(readyState, "interactive", "document.readyState should be 'interactive' on DOMContentLoaded");
  41. showMessage("DOMContentLoaded: " + readyState);
  42. }
  43. SimpleTest.waitForExplicitFinish();
  44. </script>
  45. </pre>
  46. </body>
  47. </html>