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
);
9 let oncurrententrychange_called
= false;
10 i
.contentWindow
.navigation
.oncurrententrychange
= t
.step_func(e
=> {
11 oncurrententrychange_called
= true;
12 assert_equals(e
.from, i
.contentWindow
.navigation
.currentEntry
);
13 assert_equals(e
.navigationType
, "reload");
14 assert_equals(i
.contentWindow
.navigation
.currentEntry
.index
, 0);
16 i
.contentWindow
.navigation
.onnavigate
= e
=> e
.transitionWhile(Promise
.resolve());
17 let result
= i
.contentWindow
.navigation
.reload();
18 assert_true(oncurrententrychange_called
);
19 await result
.committed
;
20 }, "AppHistoryCurrentChangeEvent fires for navigation.reload() intercepted by transitionWhile");