Bug 1760181 [wpt PR 33182] - App history API to navigation API rename (2/n), a=testonly
[gecko.git] / testing / web-platform / tests / navigation-api / updateCurrentEntry-method / not-fully-active.html
blobfce5e72c8d400e35ce42938dded89d5c837db77e
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>
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;
12 iframe.remove();
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>