file_bug326337_inner.html (769B)
1 <!DOCTYPE HTML> 2 <html> 3 <!-- 4 https://bugzilla.mozilla.org/show_bug.cgi?id=326337 5 --> 6 <head> 7 <title>Inner file for Bug 326337</title> 8 </head> 9 <body> 10 <script> 11 12 document.domain = "example.com"; 13 14 runTest(); 15 16 var xhr; 17 18 function runTest() { 19 xhr = new XMLHttpRequest(); 20 xhr.open("GET", "file_bug326337.xml", true); 21 xhr.onreadystatechange = function() { 22 if (xhr.readyState == 4) { 23 check(xhr.responseXML.documentElement.getAttribute("root")); 24 SpecialPowers.spawn(parent, [], () => { 25 content.location.hash = "#done"; 26 }); 27 } 28 } 29 xhr.send(null); 30 } 31 32 function check(attr) { 33 if (attr != "yes") { 34 SpecialPowers.spawn(parent, [], () => { 35 content.location.hash = "#fail"; 36 }); 37 throw 1; 38 } 39 } 40 41 </script> 42 </pre> 43 </body> 44 </html>