key-id-location-reload.html (777B)
1 <!doctype html> 2 <script src="/resources/testharness.js"></script> 3 <script src="/resources/testharnessreport.js"></script> 4 <iframe id="i" src="/common/blank.html"></iframe> 5 <script> 6 async_test(t => { 7 let start_length = navigation.entries().length; 8 window.onload = t.step_func(() => { 9 let key = i.contentWindow.navigation.currentEntry.key; 10 let id = i.contentWindow.navigation.currentEntry.id; 11 i.contentWindow.location.reload(); 12 i.onload = t.step_func_done(() => { 13 assert_equals(key, i.contentWindow.navigation.currentEntry.key); 14 assert_equals(id, i.contentWindow.navigation.currentEntry.id); 15 assert_equals(navigation.entries().length, start_length); 16 }); 17 }); 18 }, "NavigationHistoryEntry's key and id after location.reload()"); 19 </script>