Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  test_bug1385905.html

  Sprache: HTML
 

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


<!DOCTYPE html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi=id=1385905
-->

<html>
<head>
  <script src="/tests/SimpleTest/SimpleTest.js"></script>
  <script src="/tests/SimpleTest/EventUtils.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1385905">Mozilla Bug 1385905</a>
<div id="display"></div>
<div id="editor" contenteditable style="padding: 5px;"><div>contents</div></div>
<pre id="test">
</pre>

<script class="testbody" type="application/javascript">
SimpleTest.waitForExplicitFinish();
SimpleTest.waitForFocus(() => {
  function ensureNoPaddingBR() {
    for (let br of document.querySelectorAll("#editor > div > br")) {
      ok(!SpecialPowers.wrap(br).isPaddingForEmptyLastLine,
         "padding <br> element shouldn't be used with this test");
    }
  }
  document.execCommand("defaultparagraphseparator", false, "div");
  var editor = document.getElementById("editor");
  // Click the left blank area of the first line to set cursor to the start of "contents".
  synthesizeMouse(editor, 310, {});
  synthesizeKey("KEY_Enter");
  is(editor.innerHTML, "<div><br></div><div>contents</div>",
     "Typing Enter at start of the <div> element should split the <div> element");
  synthesizeKey("KEY_ArrowUp");
  sendString("x");
  is(editor.innerHTML, "<div>x</div><div>contents</div>",
     "Typing 'x' at the empty <div> element should just insert 'x' into the <div> element");
  ensureNoPaddingBR();
  synthesizeKey("KEY_Enter");
  is(editor.innerHTML, "<div>x</div><div><br></div><div>contents</div>",
     "Typing Enter next to 'x' in the first <div> element should split the <div> element and inserts <br> element to a new <div> element");
  ensureNoPaddingBR();
  synthesizeKey("KEY_Enter");
  is(editor.innerHTML, "<div>x</div><div><br></div><div><br></div><div>contents</div>",
     "Typing Enter in the empty <div> should split the <div> element and inserts <br> element to a new <div> element");
  ensureNoPaddingBR();
  SimpleTest.finish();
});
</script>
</body>
</html>

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

¤ Dauer der Verarbeitung: 0.12 Sekunden  (vorverarbeitet am  2026-06-04) ¤

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






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik