<!doctype html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<a id="a" href="#1"></a>
<script>
async_test(t => {
  navigation.onnavigatesuccess = t.step_func_done(() => assert_equals(location.hash, "#1"));
  a.click();
}, "navigatesuccess fires for a same-document navigation");
</script>
