Improve navigate-child-function.html and navigate-child-function-src.html.

This commit is contained in:
Ms2ger 2016-10-13 11:08:44 +02:00
parent b9ad395a61
commit c78743162c
2 changed files with 12 additions and 10 deletions

View file

@ -6,12 +6,13 @@
<div id=log></div>
<iframe src="support/set-parent-src.html"></iframe>
<script>
onload = function() {
async_test(function() {
onload = this.step_func(function() {
var fr = document.querySelector("iframe")
fr.contentWindow.go()
fr.onload = function() {
fr.onload = this.step_func_done(function() {
assert_equals(fr.contentDocument.referrer, document.URL)
done()
}
}
})
})
})
</script>

View file

@ -6,13 +6,14 @@
<div id=log></div>
<iframe src="support/location-set.html"></iframe>
<script>
onload = function() {
async_test(function() {
onload = this.step_func(function() {
var fr = document.querySelector("iframe")
var url = fr.contentDocument.URL
fr.contentWindow.go()
fr.onload = function() {
fr.onload = this.step_func_done(function() {
assert_equals(fr.contentDocument.referrer, url)
done()
}
}
})
})
})
</script>