Bug 1757847 [wpt PR 33036] - Update wpt metadata, a=testonly
[gecko.git] / testing / web-platform / tests / app-history / app-history-entry / key-id-location-replace-cross-origin.html
blobee0f749a9edc3435e454f96ef83a366494a1de99
1 <!doctype html>
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>
6 <script>
7 async_test(t => {
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);
15 });
16 }, "AppHistoryEntry's key and id after location.replace()");
17 </script>