gecko-dev/testing/web-platform/tests/dom/nodes/Document-URL.html
kaixinjxq fef0b73321 Bug 1482047 [wpt PR 12373] - Fix bug in Document-url.sub.html, a=testonly
Automatic update from web-platform-testsFix bug in Document-url.sub.html

Test will fail if there's no port in url, so replace it with location.origin

--

wpt-commits: 5beb2be312cf1817cf7d0ca087ffb4d897b80617
wpt-pr: 12373
2018-08-14 16:45:24 +00:00

18 lines
635 B
HTML

<!doctype html>
<meta charset=utf-8>
<title>Document.URL with redirect</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id=log></div>
<script>
async_test(function() {
var iframe = document.createElement("iframe");
iframe.src = "/common/redirect.py?location=/common/blank.html";
document.body.appendChild(iframe);
this.add_cleanup(function() { document.body.removeChild(iframe); });
iframe.onload = this.step_func_done(function() {
assert_equals(iframe.contentDocument.URL,
location.origin + "/common/blank.html");
});
})
</script>