test_bug969346.html 898 B

12345678910111213141516171819202122232425262728293031323334
  1. <!doctype html>
  2. <html>
  3. <!--
  4. https://bugzilla.mozilla.org/show_bug.cgi?id=969346
  5. -->
  6. <head>
  7. <title>Nesting of srcdoc iframes is permitted</title>
  8. <script src="/tests/SimpleTest/SimpleTest.js"></script>
  9. <link rel="stylesheet" href="/tests/SimpleTest/test.css"/>
  10. </head>
  11. <body>
  12. <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=969349">Mozilla Bug 969346</a>
  13. <iframe id="pframe" srcdoc="<iframe id='iframe' srcdoc='I am nested'></iframe"></iframe>
  14. <pre id="test">
  15. <script>
  16. SimpleTest.waitForExplicitFinish();
  17. addLoadEvent(function () {
  18. var pframe = $("pframe");
  19. var pframeDoc = pframe.contentDocument;
  20. var iframe = pframeDoc.getElementById("iframe");
  21. var innerDoc = iframe.contentDocument;
  22. is(innerDoc.body.innerHTML, "I am nested", "Nesting not working?");
  23. SimpleTest.finish();
  24. });
  25. </script>
  26. </pre>
  27. </body>
  28. </html>