summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/dom/nodes/Document-URL.html
blob: 242def1fb342d6a47e85855356c004b61c2ba3a7 (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>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>