not-fully-active.html (672B)
1 <!doctype html> 2 <script src="/resources/testharness.js"></script> 3 <script src="/resources/testharnessreport.js"></script> 4 <iframe id="iframe" src="/common/blank.html"></iframe> 5 6 <script> 7 async_test(t => { 8 window.onload = t.step_func_done(() => { 9 const wNavigation = iframe.contentWindow.navigation; 10 const wDOMException = iframe.contentWindow.DOMException; 11 12 iframe.remove(); 13 14 assert_throws_dom("InvalidStateError", wDOMException, () => { 15 wNavigation.updateCurrentEntry({ state: 1 }); 16 }); 17 assert_equals(navigation.currentEntry.getState(), undefined); 18 }); 19 }, "updateCurrentEntry() must throw if the document is not fully active"); 20 </script>