summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/browsers/history/the-history-interface/pushstate-replacestate-empty-string/replacestate-whitespace.html
blob: 7261cdf3fa1c12bed536cf70b3eac408c368aef8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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>