test_bug969346.html (898B)
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 14 <iframe id="pframe" srcdoc="<iframe id='iframe' srcdoc='I am nested'></iframe"></iframe> 15 16 <pre id="test"> 17 <script> 18 19 SimpleTest.waitForExplicitFinish(); 20 addLoadEvent(function () { 21 var pframe = $("pframe"); 22 var pframeDoc = pframe.contentDocument; 23 var iframe = pframeDoc.getElementById("iframe"); 24 var innerDoc = iframe.contentDocument; 25 26 is(innerDoc.body.innerHTML, "I am nested", "Nesting not working?"); 27 SimpleTest.finish(); 28 }); 29 30 </script> 31 </pre> 32 </body> 33 </html>