chromium/third_party/blink/web_tests/fast/spatial-navigation/snav-start-at-document-bottom.html

<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="resources/snav-testharness.js"></script>
<button id="a">A</button><br>
<button id="b" style="margin-top: 120%;">B</button>

<p>When no element is focused, start searching from the document's bottom.</p>

<script>
  snav.assertSnavEnabledAndTestable();

  test(() => {
    window.scrollTo(0, document.body.scrollHeight);
    eventSender.keyDown('ArrowUp');
    assert_equals(document.activeElement, b);
  }, "Spatnav picks the document's bottommost element.");
</script>