summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/browsers/history/the-history-interface/pushstate-replacestate-empty-string/pushstate-whitespace.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/html/browsers/history/the-history-interface/pushstate-replacestate-empty-string/pushstate-whitespace.html')
-rw-r--r--testing/web-platform/tests/html/browsers/history/the-history-interface/pushstate-replacestate-empty-string/pushstate-whitespace.html20
1 files changed, 20 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/browsers/history/the-history-interface/pushstate-replacestate-empty-string/pushstate-whitespace.html b/testing/web-platform/tests/html/browsers/history/the-history-interface/pushstate-replacestate-empty-string/pushstate-whitespace.html
new file mode 100644
index 0000000000..72d9be6a9c
--- /dev/null
+++ b/testing/web-platform/tests/html/browsers/history/the-history-interface/pushstate-replacestate-empty-string/pushstate-whitespace.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>history.pushState() 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.pushState(null, null, " ");
+ assert_equals(location.pathname, before, "pathname");
+ assert_equals(location.hash, "", "hash");
+});
+</script>