diff options
Diffstat (limited to 'testing/web-platform/tests/navigation-api/state/history-replaceState.html')
-rw-r--r-- | testing/web-platform/tests/navigation-api/state/history-replaceState.html | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/testing/web-platform/tests/navigation-api/state/history-replaceState.html b/testing/web-platform/tests/navigation-api/state/history-replaceState.html new file mode 100644 index 0000000000..bdf3561639 --- /dev/null +++ b/testing/web-platform/tests/navigation-api/state/history-replaceState.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.replaceState(1, "", "#replace"); + assert_equals(navigation.currentEntry.getState(), undefined); +}, "entry.getState() after history.replaceState()"); +</script> |