test_bug174351.html (901B)
1 <!DOCTYPE HTML> 2 <html> 3 <!-- 4 https://bugzilla.mozilla.org/show_bug.cgi?id=174351 5 --> 6 <head> 7 <title>Test for Bug 174351</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=174351">Mozilla Bug 174351</a> 13 <p id="display"></p> 14 <div id="content" style="display: none"> 15 16 </div> 17 <pre id="test"> 18 <script class="testbody" type="text/javascript"> 19 var iframe = document.createElement("iframe"); 20 iframe.src = "invalidchar.xml"; 21 iframe.onload = function() { 22 var doc = document.getElementById("test").childNodes[1].contentDocument; 23 ok(doc.documentElement.tagName != "root", "Since XML has invalid enconding, must throw error"); 24 }; 25 26 document.getElementById("test").appendChild(iframe); 27 </script> 28 </pre> 29 </body> 30 </html>