Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/editor/spellchecker/tests/   (Browser von der Mozilla Stiftung Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 2 kB image not shown  

Quelle  test_bug636465.html   Sprache: HTML

 
 products/Sources/formale Sprachen/C/Firefox/editor/spellchecker/tests/test_bug636465.html


<!doctype html>
<title>Mozilla bug 636465</title>
<link rel=stylesheet href="/tests/SimpleTest/test.css">
<script src="/tests/SimpleTest/EventUtils.js"></script>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<script src="/tests/SimpleTest/WindowSnapshot.js"></script>
<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=636465"
   target="_blank">Mozilla Bug 636465</a>
<input id="x" value="foobarbaz" spellcheck="true" style="background-color: transparent; border: transparent;">
<script>
SimpleTest.waitForExplicitFinish();

function runTest() {
  const { onSpellCheck } = SpecialPowers.ChromeUtils.importESModule(
    "resource://testing-common/AsyncSpellCheckTestHelper.sys.mjs"
  );
  var x = document.getElementById("x");
  x.focus();
  onSpellCheck(x, function() {
    x.blur();
    var spellCheckTrue = snapshotWindow(window);
    x.setAttribute("spellcheck""false");
    var spellCheckFalse = snapshotWindow(window);
    x.setAttribute("spellcheck""true");
    x.focus();
    onSpellCheck(x, function() {
      x.blur();
      var spellCheckTrueAgain = snapshotWindow(window);
      x.removeAttribute("spellcheck");
      var spellCheckNone = snapshotWindow(window);
      var ret = compareSnapshots(spellCheckTrue, spellCheckFalse, false)[0];
      ok(ret,
         "Setting the spellcheck attribute to false should work");
      if (!ret) {
        ok(false, "\nspellCheckTrue: " + spellCheckTrue.toDataURL() + "\nspellCheckFalse: " + spellCheckFalse.toDataURL());
      }
      ret = compareSnapshots(spellCheckTrue, spellCheckTrueAgain, true)[0];
      ok(ret,
         "Setting the spellcheck attribute back to true should work");
      if (!ret) {
        ok(false, "\nspellCheckTrue: " + spellCheckTrue.toDataURL() + "\nspellCheckTrueAgain: " + spellCheckTrueAgain.toDataURL());
      }
      ret = compareSnapshots(spellCheckNone, spellCheckFalse, true)[0];
      ok(ret,
         "Unsetting the spellcheck attribute should work");
      if (!ret) {
        ok(false, "\spellCheckNone: " + spellCheckNone.toDataURL() + "\nspellCheckFalse: " + spellCheckFalse.toDataURL());
      }
      SimpleTest.finish();
    });
  });
}
addLoadEvent(runTest);
</script>

Messung V0.5
C=95 H=100 G=97

¤ Dauer der Verarbeitung: 0.2 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

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.