2 <script src=
"/resources/testharness.js"></script>
3 <script src=
"/resources/testharnessreport.js"></script>
4 <script src=
"/common/get-host-info.sub.js"></script>
5 <iframe id=
"i" src=
"/common/blank.html"></iframe>
8 window
.onload
= t
.step_func(() => {
9 let key_before_replace
= i
.contentWindow
.navigation
.currentEntry
.key
;
10 window
.onmessage
= t
.step_func_done(e
=> assert_not_equals(key_before_replace
, e
.data
));
12 let cross_origin_url
= new URL("resources/post-key-to-top.html", location
.href
);
13 cross_origin_url
.hostname
= get_host_info().REMOTE_HOST
;
14 i
.contentWindow
.location
.replace(cross_origin_url
.href
);
16 }, "AppHistoryEntry's key and id after location.replace()");