summaryrefslogtreecommitdiffstats
path: root/dom/tests/mochitest/bugs/file_bug593174_2.html
blob: 080b016d7c90c3b3528a6cb2031ea7d2db5f46b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<html>
<body>
Page 2 has an iframe of its own.
<iframe id='inner-iframe' onload='innerIframeLoaded()' srcdoc='
      <html><body>
        <script>function go() { window.location = "file_bug593174_1.html"; }</script>
      </body></html>'>
</iframe>

<script>
function innerIframeLoaded() {
  if (parent.iframeLoaded) {
    parent.iframeLoaded('inner');
  }
  else if(opener.iframeLoaded) {
    opener.iframeLoaded('popup/inner');
  }
}

function navigateInnerIframe() {
  document.getElementById('inner-iframe').contentWindow.go();
}

function getInnerIframeReferrer() {
  return document.getElementById('inner-iframe').contentWindow.document.referrer;
}
</script>

</body>
</html>