docshell/test/navigation/file_bug508537_1.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/docshell/test/navigation/file_bug508537_1.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,34 @@
     1.4 +<html>
     1.5 +  <head>
     1.6 +    <script>
     1.7 +      function dynFrameLoad() {
     1.8 +        var ifrs = document.getElementsByTagName("iframe");
     1.9 +        opener.ok(new String(ifrs[0].contentWindow.location).indexOf(ifrs[0].src) >= 0,
    1.10 +                  "Wrong document loaded (1)\n");
    1.11 +        opener.ok(new String(ifrs[1].contentWindow.location).indexOf(ifrs[1].src) >= 0,
    1.12 +                  "Wrong document loaded (2)\n");
    1.13 +        if (opener && ++opener.testCount == 1) {
    1.14 +          window.location = "goback.html";
    1.15 +        } else {
    1.16 +          opener.nextTest();
    1.17 +          window.close();
    1.18 +        }
    1.19 +      }
    1.20 +
    1.21 +      window.addEventListener("load",
    1.22 +        function () {
    1.23 +          var container = document.getElementById("t1");
    1.24 +          container.addEventListener("load", dynFrameLoad, true);
    1.25 +          container.appendChild(container.appendChild(document.getElementById("i1")));
    1.26 +        }, false);
    1.27 +    </script>
    1.28 +  </head>
    1.29 +  <body>
    1.30 +    <h5>Container:</h5>
    1.31 +    <div id="t1"></div>
    1.32 +    <h5>Original frames:</h5>
    1.33 +    <iframe id="i1" src="frame0.html"></iframe>
    1.34 +    <iframe src="frame1.html"></iframe>
    1.35 +  </body>
    1.36 +</html>
    1.37 +

mercurial