summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/browsers/browsing-the-web/navigating-across-documents/source/navigate-child-function.html
blob: b75062b8d93bed887dc7e7bdf26af9b26ccc674c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<!doctype html>
<meta charset=utf-8>
<title>Set location from a function called from a parent</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id=log></div>
<iframe src="support/location-set.html"></iframe>
<script>
  onload = function() {
    var fr = document.querySelector("iframe")
    var url = fr.contentDocument.URL
    fr.contentWindow.go()
    fr.onload = function() {
      assert_equals(fr.contentDocument.referrer, url)
      done()
    }
  }
</script>