summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/navigation-api/updateCurrentEntry-method/initial-about-blank.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/navigation-api/updateCurrentEntry-method/initial-about-blank.html')
-rw-r--r--testing/web-platform/tests/navigation-api/updateCurrentEntry-method/initial-about-blank.html13
1 files changed, 13 insertions, 0 deletions
diff --git a/testing/web-platform/tests/navigation-api/updateCurrentEntry-method/initial-about-blank.html b/testing/web-platform/tests/navigation-api/updateCurrentEntry-method/initial-about-blank.html
new file mode 100644
index 0000000000..c28137c082
--- /dev/null
+++ b/testing/web-platform/tests/navigation-api/updateCurrentEntry-method/initial-about-blank.html
@@ -0,0 +1,13 @@
+<!doctype html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<iframe id="iframe"></iframe>
+
+<script>
+test(() => {
+ assert_throws_dom("InvalidStateError", iframe.contentWindow.DOMException, () => {
+ iframe.contentWindow.navigation.updateCurrentEntry({ state: 1 });
+ });
+ assert_equals(navigation.currentEntry.getState(), undefined);
+}, "updateCurrentEntry() must throw if the document is still on the initial about:blank");
+</script>