Source code

Revision control

Copy as Markdown

Other Tools

Test Info: Warnings

  • This test has a WPT meta file that expects 1 subtest issues.
  • This WPT test may be referenced by the following Test IDs:
<!doctype html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/common/get-host-info.sub.js"></script>
<body>
<script>
async_test(t => {
let starting_history_length = history.length;
let cross_origin_url = new URL(get_host_info().HTTPS_REMOTE_ORIGIN);
cross_origin_url.pathname = "/common/blank.html";
let i = document.createElement("iframe");
i.src = cross_origin_url;
document.body.appendChild(i);
window.onload = () => t.step_timeout(() => {
assert_equals(starting_history_length, history.length);
i.onload = t.step_func_done(() => assert_equals(starting_history_length + 1, history.length));
i.src = cross_origin_url;
}, 0);
}, "Navigating a cross-origin iframe to its current url should not replace");
</script>
</body>