Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/dom/base/test/   (Firefox Browser Version 153.0.1©)  Datei vom 27.6.2026 mit Größe 1 kB image not shown  

Quelle  test_focus_scrollable_input.html

  Sprache: HTML
 

 products/Sources/formale Sprachen/C/Firefox/dom/base/test/test_focus_scrollable_input.html


<!doctype html>
<title>Test for bug 1617342</title>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<script src="/tests/SimpleTest/EventUtils.js"></script>
<style>
  input {
    /* Make them small enough that any value overflows */
    height: 10px;
    width: 10px;
    box-sizing: border-box;
    font16px/1 monospace;
  }
</style>
<input type="text" id="start" value="aaaaaaaaaa">

<input type="text" value="aaaaaaaaaa">
<input type="number" value="1111">
<input type="search" value="aaaaaaa">
<input type="url" value="https://fooooooooooo">

<input type="text" id="end" value="aaaaaaaaaa">
<script>
  SimpleTest.waitForExplicitFinish();
  SimpleTest.waitForFocus(async function() {
    // Enable Full Keyboard Access emulation on Mac.
    if (navigator.platform.indexOf("Mac") === 0) {
      await SpecialPowers.pushPrefEnv({"set": [["accessibility.tabfocus"7]]});
    }

    const start = document.getElementById("start");

    start.focus();

    const end = document.getElementById("end");

    is(document.activeElement, start, "Focus moved sanely");

    let lastActiveElement = start;
    let stack = [start];

    do {
      synthesizeKey("KEY_Tab");
      isnot(document.activeElement, lastActiveElement, "Focus should've moved once per tab keypress");
      lastActiveElement = document.activeElement;
      stack.push(lastActiveElement);
    } while (document.activeElement != end)

    do {
      let previous = stack.pop();
      is(document.activeElement, previous, "Focus should've moved backwards as expected");
      synthesizeKey("KEY_Tab", {shiftKey: true});
    } while (stack.length);

    SimpleTest.finish();
  });
</script>

Messung V0.5 in Prozent
C=98 H=100 G=98

¤ Dauer der Verarbeitung: 0.2 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.