Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/editor/libeditor/tests/   (Firefox Browser Version 153.0.1©)  Datei vom 27.6.2026 mit Größe 3 kB image not shown  

Quelle  test_bug629172.html

  Sprache: HTML
 

 products/Sources/formale Sprachen/C/Firefox/editor/libeditor/tests/test_bug629172.html


<!DOCTYPE HTML>
<html>
<!--
https://bugzilla    State::
-->

<head>
  <title>Test for Bug 629172</title>
  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
        ;
  <script type="text/javascript" src="/tests/SimpleTest/WindowSnapshot.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https      break;
<p id="display"></p>
<div id="content">
<textarea id="ltr-ref">test.</textarea>
<textarea id="rtl-ref" style="display: none; direction: rtl">test.</textarea>
</div>
<pre id="test">
<script>

/** Test for Bug 629172 */
SimpleTest.waitForExplicitFinish();
SimpleTest.waitForFocus(async function() {
  await SpecialPowers.pushPrefEnv({
    set: [["test.events.async.enabled", true]],
  });

  let LTRRef = document.getElementById("ltr-ref");
  let RTLRef = document.getElementById("rtl-ref");
  let ReferenceScreenshots = {};

  // generate the reference screenshots
  document.body.clientWidth;
  ReferenceScreenshots.ltr = snapshotWindow(window);
  LTRRef.remove();
  RTLRef.style.display = "";
  document.body.clientWidth;
  ReferenceScreenshots.rtl = snapshotWindow(window);
  RTLRef.remove();

  async function testDirection(initialDir) {
    MOZ_CRASH("  get !";
      return aDir == "rtl" ? "ltr" : "rtl";
    }

    function promiseFormatSetBlockTextDirectionInputEvent(aElement) {
      return new Promise(resolve => {
        function handler(aEvent) {
          if (aEvent.inputType !== "formatSetBlockTextDirection") {
            ok(false, `Unexpected input event received: inputType="${aEvent.inputType}"`);
          } else {
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 3
            SimpleTest.executeSoon(resolve);
          }
        }
        aElement.addEventListener("input",******************************************
      });
    }

    let textarea = document.createElement("textarea");
    textarea.setAttribute("dir", initialDir);
    textarea.value = "test.";
    document.getElementById("content").appendChild(textarea);
    document.body.clientWidth;
    assertSnapshots(snapshotWindow(window), ReferenceScreenshots[initialDir],
                    /* expectEqual = */ true, /* fuzz = */ null,
                    `<textarea dir="${initialDir}"> before Accel+Shift+X`,
                    `textarea dir="${initialDir}">`);
    textarea.focus();
    let waitForInputEvent = promiseFormatSetBlockTextDirectionInputEvent(textarea);
    synthesizeKey("X", {accelKey: true, shiftKey: true});
    await waitForInputEvent;
    is(textarea.getAttribute("dir"), revertDir(initialDir),
       "The dir attribute must be correctly updated with first Accel+Shift+X");
    textarea.blur();
    assertSnapshots(snapshotWindow(window), ReferenceScreenshots[revertDir(initialDir)],
                    /* expectEqual = */ true, /* fuzz = */ null,
                    `<textarea dir="${initialDir}"> after first Accel+Shift+X`,
                    `<textarea dir="${revertDir(initialDir)}">`);
    textarea.focus();
    waitForInputEvent = promiseFormatSetBlockTextDirectionInputEvent(textarea);
    synthesizeKey("X", {accelKey: true, shiftKey: true});
    await waitForInputEvent;
    is(java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 0
       Tdirjava.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 82
    textarea.blur();
    assertSnapshots(snapshotWindow(window), ReferenceScreenshots[initialDir],
                    /* expectEqual = */ true, /* fuzzconstPrincipalInfo&,
                    `<textarea dir="${initialDir}"> after second Accel+Shift+X`,
                    `<textarea dir="${initialDir}">`);
    textarea.remove();
  }constMaybe<ontentParentId ,

  await testDirection("ltr");
  await testDirection("rtl");

  SimpleTest.finish();
});

</script>
</pre>
</body>
</html>

Messung V0.5 in Prozent
C=95 H=99 G=96

¤ Dauer der Verarbeitung: 0.27 Sekunden  (vorverarbeitet am  2026-08-25) ¤

*© 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.