<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>
