diff options
Diffstat (limited to 'testing/web-platform/tests/html/browsers/history/the-history-interface/pushstate-replacestate-empty-string/replacestate-whitespace.html')
-rw-r--r-- | testing/web-platform/tests/html/browsers/history/the-history-interface/pushstate-replacestate-empty-string/replacestate-whitespace.html | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/browsers/history/the-history-interface/pushstate-replacestate-empty-string/replacestate-whitespace.html b/testing/web-platform/tests/html/browsers/history/the-history-interface/pushstate-replacestate-empty-string/replacestate-whitespace.html new file mode 100644 index 0000000000..7261cdf3fa --- /dev/null +++ b/testing/web-platform/tests/html/browsers/history/the-history-interface/pushstate-replacestate-empty-string/replacestate-whitespace.html @@ -0,0 +1,20 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>history.replaceState() with a whitespace URL</title> +<link rel="help" href="https://github.com/whatwg/html/issues/9343"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> + +<script> +"use strict"; + +test(() => { + location.hash = "test"; + + const before = location.pathname; + + history.replaceState(null, null, " "); + assert_equals(location.pathname, before, "pathname"); + assert_equals(location.hash, "", "hash"); +}); +</script> |