chromium/third_party/blink/web_tests/wpt_internal/soft-navigation-heuristics/keypress.html

<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Detect keyboard-event based soft navigations.</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src="/soft-navigation-heuristics/resources/soft-navigation-helper.js"></script>
</head>
<!-- Not including a body element to ensure the keypress heuristic works on
     malformed HTML -->
  <main id=main>
    <div>
      First LCP!
    </div>
  </main>
  <script>
    window.addEventListener("keydown", () => {
      timestamps[counter]["eventEnd"] = performance.now();
    });
    testSoftNavigation({
      addContent: () => {
        addTextToDivOnMain();
      },
      link: document.body,
      interactionFunc: () => { window.eventSender.keyDownAsync('j'); },
      eventType: "keypress",
      test: "Keypress on body triggers SoftNavigationHeuristics"});
  </script>
</html>