chromium/third_party/blink/web_tests/fast/history/resources/history-back-within-subframe-hash-2.html

<script>
onload = function() {
  setTimeout(function() {
    location.hash = "#foo";
  }, 0);
}
onhashchange = function() {
  if (location.hash == "#foo") {
    history.back();
  }
  if (location.hash == "") {
    parent.document.getElementById("result").innerText = "PASS";
    if (window.testRunner)
      testRunner.notifyDone();
  }
}
</script>