summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/navigation-api/state/history-pushState.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/navigation-api/state/history-pushState.html')
-rw-r--r--testing/web-platform/tests/navigation-api/state/history-pushState.html11
1 files changed, 11 insertions, 0 deletions
diff --git a/testing/web-platform/tests/navigation-api/state/history-pushState.html b/testing/web-platform/tests/navigation-api/state/history-pushState.html
new file mode 100644
index 0000000000..7d3c79ba6c
--- /dev/null
+++ b/testing/web-platform/tests/navigation-api/state/history-pushState.html
@@ -0,0 +1,11 @@
+<!doctype html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+test(() => {
+ navigation.navigate("#", { history: "replace", state: { data: "value" } });
+ assert_equals(navigation.currentEntry.getState().data, "value");
+ history.pushState(1, "", "#push");
+ assert_equals(navigation.currentEntry.getState(), undefined);
+}, "entry.getState() after history.pushState()");
+</script>