2 <script src=
"/resources/testharness.js"></script>
3 <script src=
"/resources/testharnessreport.js"></script>
4 <iframe id=
"i" src=
"/common/blank.html"></iframe>
6 promise_test(async t
=> {
7 await
new Promise(resolve
=> { window
.onload
= resolve
; });
10 const original
= i
.contentWindow
.navigation
.currentEntry
;
11 const { key
, id
} = original
;
13 i
.contentWindow
.navigation
.addEventListener("navigate", e
=> e
.transitionWhile(Promise
.resolve()));
15 i
.onload
= t
.unreached_func("the iframe must not reload");
17 await i
.contentWindow
.location
.reload();
19 assert_equals(i
.contentWindow
.navigation
.currentEntry
, original
);
20 assert_equals(i
.contentWindow
.navigation
.currentEntry
.key
, key
);
21 assert_equals(i
.contentWindow
.navigation
.currentEntry
.id
, id
);
22 }, "AppHistoryEntry's key and id after location.reload() intercepted by transitionWhile()");