dom/tests/mochitest/bugs/file_bug593174_2.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/tests/mochitest/bugs/file_bug593174_2.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,30 @@
     1.4 +<html>
     1.5 +<body>
     1.6 +Page 2 has an iframe of its own.
     1.7 +<iframe id='inner-iframe' onload='innerIframeLoaded()' src='data:text/html,
     1.8 +      <html><body>
     1.9 +        <script>function go() { window.location = "file_bug593174_1.html"; }</script>
    1.10 +      </body></html>'>
    1.11 +</iframe>
    1.12 +
    1.13 +<script>
    1.14 +function innerIframeLoaded() {
    1.15 +  if (parent.iframeLoaded) {
    1.16 +    parent.iframeLoaded('inner');
    1.17 +  }
    1.18 +  else if(opener.iframeLoaded) {
    1.19 +    opener.iframeLoaded('popup/inner');
    1.20 +  }
    1.21 +}
    1.22 +
    1.23 +function navigateInnerIframe() {
    1.24 +  document.getElementById('inner-iframe').contentWindow.go();
    1.25 +}
    1.26 +
    1.27 +function getInnerIframeReferrer() {
    1.28 +  return document.getElementById('inner-iframe').contentWindow.document.referrer;
    1.29 +}
    1.30 +</script>
    1.31 +
    1.32 +</body>
    1.33 +</html>

mercurial