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


Quelle  test_input_number_l10n.html   Sprache: HTML

 
 products/sources/formale Sprachen/C/Firefox/dom/html/test/forms/test_input_number_l10n.html


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

<head>
  <title>Test localization of number control input</title>
  <script src="/tests/SimpleTest/SimpleTest.js"></script>
  <script src="/tests/SimpleTest/EventUtils.js"></script>
  <script type="text/javascript" src="test_input_number_data.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
  <meta charset="UTF-8">
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=844744">Mozilla Bug 844744</a>
<p id="display"></p>
<div id="content">
  <input id="input" type="number" step="any">
</div>
<pre id="test">
<script type="application/javascript">

/**
 * Test for Bug 844744
 * This test checks that localized input that is typed into <input type=number>
 * is correctly handled.
 **/
SimpleTest.waitForExplicitFinish();

SimpleTest.waitForFocus(function() {
  startTests();
  SimpleTest.finish();
});

var elem;

function runTest(test) {
  elem.lang = test.langTag;
  elem.value = 0;
  elem.focus();
  elem.select();
  sendString(test.inputWithGrouping);
  is(elem.value, """Test " + test.desc + " ('" + test.langTag +
                     "') localization with grouping separator");
  elem.value = 0;
  elem.select();
  sendString(test.inputWithoutGrouping);
  is(elem.valueAsNumber, test.value, "Test " + test.desc + " ('" + test.langTag +
                                     "') localization without grouping separator");
  is(elem.value, String(test.value), "Test " + test.desc + " ('" + test.langTag +
                                     "') localization without grouping separator as string");
}

function runInvalidInputTest(test) {
  elem.lang = test.langTag;
  elem.value = 0;
  elem.focus();
  elem.select();
  sendString(test.input);
  is(elem.value, """Test " + test.desc + " ('" + test.langTag +
                             "') with invalid input: " + test.input);
}

function startTests() {
  elem = document.getElementById("input");
  for (var test of tests) {
    runTest(test, elem);
  }
  for (var test of invalidTests) {
    runInvalidInputTest(test, elem);
  }
}

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

Messung V0.5
C=99 H=100 G=99

¤ Dauer der Verarbeitung: 0.0 Sekunden  (vorverarbeitet)  ¤

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






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge