content/base/test/file_bug326337_inner.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/content/base/test/file_bug326337_inner.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,40 @@
     1.4 +<!DOCTYPE HTML>
     1.5 +<html>
     1.6 +<!--
     1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=326337
     1.8 +-->
     1.9 +<head>
    1.10 +  <title>Inner file for Bug 326337</title>
    1.11 +</head>
    1.12 +<body>
    1.13 +<script>
    1.14 +
    1.15 +document.domain = "example.com";
    1.16 +
    1.17 +runTest();
    1.18 +
    1.19 +var xhr;
    1.20 +
    1.21 +function runTest() {
    1.22 +  xhr = new XMLHttpRequest();
    1.23 +  xhr.open("GET", "file_bug326337.xml", true);
    1.24 +  xhr.onreadystatechange = function() {
    1.25 +    if (xhr.readyState == 4) {
    1.26 +      check(xhr.responseXML.documentElement.getAttribute("root"));
    1.27 +      SpecialPowers.wrap(parent).location.hash = "#done";
    1.28 +    }
    1.29 +  }
    1.30 +  xhr.send(null);
    1.31 +}
    1.32 +
    1.33 +function check(attr) {
    1.34 +  if (attr != "yes") {
    1.35 +    SpeciaPowers.wrap(parent).location.hash = "#fail";
    1.36 +    throw 1;
    1.37 +  }
    1.38 +}
    1.39 +
    1.40 +</script>
    1.41 +</pre>
    1.42 +</body>
    1.43 +</html>

mercurial