test_bug287465.html (1259B)
1 <!DOCTYPE HTML> 2 <html> 3 <!-- 4 https://bugzilla.mozilla.org/show_bug.cgi?id=287465 5 --> 6 <head> 7 <title>Test for Bug 287465</title> 8 <script 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=287465">Mozilla Bug 287465</a> 13 <p id="display"></p> 14 <div id="content" style="display:none"> 15 16 <iframe id="i1" srcdoc="<svg xmlns='http://www.w3.org/2000/svg'></svg>"></iframe> 17 <object id="o1" data="object_bug287465_o1.html"></object> 18 <iframe id="i2" srcdoc="<html></html>"></iframe> 19 <object id="o2" data="object_bug287465_o2.html"></object> 20 21 </div> 22 <pre id="test"> 23 <script class="testbody" type="text/javascript"> 24 25 SimpleTest.waitForExplicitFinish(); 26 addLoadEvent(doTest); 27 28 function doTest() { 29 function checkSVGDocument(id) { 30 var e = document.getElementById(id); 31 ok(e.contentDocument != null, "check nonnull contentDocument '" + id + "'"); 32 is(e.contentDocument, e.getSVGDocument(), "check documents match '" + id + "'"); 33 } 34 35 checkSVGDocument("o1"); 36 checkSVGDocument("i1"); 37 checkSVGDocument("o2"); 38 checkSVGDocument("i2"); 39 SimpleTest.finish(); 40 } 41 42 </script> 43 </pre> 44 </body> 45 </html>