chromium/third_party/blink/web_tests/fast/loader/stateobjects/replacestate-updates-location.html

<script>
if (window.testRunner)
  testRunner.dumpAsText();

onload = function() {
  history.replaceState(null, null, "?foo");

  if (location.search == "?foo") {
    document.body.innerText = "PASS";
  } else {
    document.body.innerText = "FAIL: location.search is \'" + location.search + "\'";
  }
}
</script>