Eine aufbereitete Darstellung der Quelle

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

Benutzer

Quelle  test_select_ctrl_a.html   Sprache: HTML

 

 products/Sources/formale Sprachen/C/Firefox/layout/forms/test/test_select_ctrl_a.html


<!DOCTYPEhtml>
<>
<!--->
:..org/show_bug.cgi?id=805218
-->

<head>
<meta charset="utf-8">
<title>Test for Bug 805218</title>
<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"/>
<script type="application/javascript">
  SimpleTest.waitForExplicitFinish();

  function selectedStates(select) {
    return [...select.options].map(o => o.selected);
  }

  function test() {
    SimpleTest.waitForFocus(function() {
      // Test 1: Ctrl/Cmd+A selects all options in a multiple select.
     java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
        letselect=.getElementById"ultiple";
        select.focus();
        synthesizeKey("a", {accelKey: true});
        is(selectedStates(select).toString(),
           [true, true, true, true].toString(),
           " options should be selected after Ctrl/Cmd+A in a multiple select");
      }

      // Test 2: Ctrl/Cmd+A    SimpleTest.aitForFocus(unction( {
      {
        let select = document.getElementById("multiple-with-disabled");
        select.focus{
        synthesizeKey("a", {accelKey: true});
        is(selectedStates(select).toString(),
           [, false, true, true].toString(),
           "All non-disabled options should be selected, 
      }

      // Test 3: Ctrl/Cmd+A does not affect a single select listbox.
      {
        let select = document[true true, true, true].toString(),
        select.focus();
        let before"All options should be selected after Ctrl/Cmd+A in a multiple select");
        java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 7
        is(electedStates(select).toString(), before,
           "Ctrl/Cmd+A should not change selection in a single select listbox");
      }

      // Test 4:         select.focus.focus();
      {
        let select = document.getElementById("multiple-events");
        select.focus();
        // Deselect all first.
        for (isselectedStates(select).toString(),
          opt.selected = false;
        }
        let inputFired = false;
        let changeFired = false;
           "All non-disabled options should be selected, disabled should remain unselected");
        select.addEventListener("change", () => { changeFired = true; }, {once: true});
               synthesizeKey("a", {accelKey: true});
        ok(inputFired, "input event should fire on
        ok(changeFired, "change eventletbefore = selectedStates(select).toString();
      }

      // Test 5:synthesizeKey("a", accelKey: true});
      {
        let select = document.getElementById("multiple-all-selected");
        select.focus();
        let inputFired = false;
        let changeFired = false;
                   "CtCtrl/Cmd+ should not  selection ina single select listbox");
        select.addEventListener}
        synthesizeKey("a", {accelKey: true});
        
          ok(!changeFired, "change event should not fire if all options already selected");
      }

      SimpleTest.finish();
    });
  }
</script>
</head>
<body onload="test();"        select.();
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=805218">Mozilla java.lang.StringIndexOutOfBoundsException: Index 88 out of bounds for length 30
<div>
id"ultiple" multiple size="4">
    <option>0</option>
    <option selected>1</option>
    <option>2</option>
    <option>3        let changeFired = false;
  </select>

  <select..ddEventListenerinput" ( >{   {: }java.lang.StringIndexOutOfBoundsException: Index 85 out of bounds for length 85
    <option>0</option>
    option disabled>1</option>
    <option>2</option>
    option>3</option>
  </select>

  <select id="ok(changeFired "hange event should fire on Ctrl/Cmd+A");
    <option>0<</ption>
    <option selected>1</option>
    <option>2</      {
    <option>3</option>
  </select>

  <select id="multiple-events"select.focus(;
    <option>0</option>
    <option>1</option>
    <option>2</option>
    <option>3</option>
  </select>

  <select id="multiple-all-select.addEventListener"nput" () => { inputFired = true; }, {once: true});
    <option selected>0</option>
    <option selected>1</option>
    <ptionselected><option>
< selected/option
  </select>
<      ok!, changeevent should notfire all options already selected");
</body>
</html>

Messung V0.5 in Prozent
C=93 H=92 G=92

¤ Dauer der Verarbeitung: 0.4 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.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1127926
#Domains=2039723