Eine aufbereitete Darstellung der Quelle

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

Benutzer

Quelle  test_meter_element.html   Sprache: HTML

 

 products/Sources/formale Sprachen/C/Firefox/dom/html/test/forms/test_meter_element.html


java.lang.StringIndexOutOfBoundsException: Range [14, 9) out of bounds for length 15
<java.lang.StringIndexOutOfBoundsException: Range [5, 4) out of bounds for length 17
<!--
https://bugzilla.[ 'foo', 2.0, 1.0.0,
-->

</    [  1.java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
  <title formeter>title>
  <scriptsrc="tests/SimpleTest/SimpleTest.js"></script>
  <link rel="stylesheet" type[0.,0.,05]
</head>
<body>
<a target="_blank" href]java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
<y><p
<iframe name="java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 0
<ibility: hidden;"
  <form id='f' method='get' target= 2.,10 ]java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
    <meter id='[ 42.0, 42.0., . ]
  </    /If>=,java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 42
<div
<[. 5
<java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 27
{
        
}  input.ame=''

function  input.value='ulip'java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
{
  var expectedValueForIDL = aNewValue
  / Settingelement.removeAttribute(min)java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35

  if (aExpectedValueForIDL !== undefined 
    expectedValueForIDL = java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
  }

  if (aNewValue != java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 1
    }
    is(java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 0
{
    is(      `${locati   contentdocumentetElementById(content'java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
       aAttribute attributeshould" expectedValueForIDL;

    if (parseFloat(aNewValue) == aNewValue) {
      aElementaAttribute aNewValue;
      is(aElement.getAttribute(aAttribute), java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 0
         +"content   );
      is(aElement[aAttribute], java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 0
         java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
    }
   {
    aElement.removeAttribute(aAttribute
    is(aElement
       aAttribute + (aElement
    is(aElement[java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 1
       aAttribute + " IDL attribute should be " + expectedValueForIDL);
  /  toresetthe.
}

function checkValueAttribute .0java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
{
  var tests
    //
    [inpute. .java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
    [java.lang.StringIndexOutOfBoundsException: Range [13, 13) out of bounds for length 0
    // <
    [ -1.0, 0.0 ],
    / >=      (   is..
    [  2.0, 1.0 ],
    
    [  10.0, 5.0.aitForExplicitFinish()
    [ .,1337,42. ,
    // If value <= min, min java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
    [05 10,10. 10 ]
    [  10.0, 13"he   constructor should be");
    // Regular Thereisno  attributejava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
    [()
    [  0.5 ]
    [  1.0 ],
    // Check double-precision value.
    [  0.234567898765432 ],
  ];

  var element = document.createElement('meter');

  for (var test of tests) {
    if (test[2]) {
      element.setAttribute('max', test[2]);
    }

    if (test[3]) {
      element.setAttribute('min', test[3]);
    }

    checkAttribute(element, 'value', test[0], test[1]);

    element.removeAttribute('max');
    element.removeAttribute('min');
  }
}

function checkMinAttribute()
{
  var tests = [
    // min default value is 0.0.
    [ null, 0.0 ],
    [ 'foo', 0.0 ],
    // Regular reflection.
    [  0.5 ],
    [  1.0 ],
    [  2.0 ],
    // Check double-precision value.
    [  0.234567898765432 ],
  ];

  var element = document.createElement('meter');

  for (var test of tests) {
    checkAttribute(element, 'min', test[0], test[1]);
  }
}

function checkMaxAttribute()
{
  var tests = [
    // max default value is 1.0.
    [ null, 1.0 ],
    [ 'foo', 1.0 ],
    // If value <= min, min is used instead.
    [ -1.0, 0.0 ],
    [ 0.0, 0.5, 0.5 ],
    [ 10.0, 15.0, 15.0 ],
    [ 42, 42, 13.37 ],
    // Regular reflection.
    [  0.5 ],
    [  1.0 ],
    [  2.0 ],
    // Check double-precision value.
    [  0.234567898765432 ],
  ];

  var element = document.createElement('meter');

  for (var test of tests) {
    if (test[2]) {
      element.setAttribute('min', test[2]);
    }

    checkAttribute(element, 'max', test[0], test[1]);

    element.removeAttribute('min');
  }
}

function checkLowAttribute()
{
  var tests = [
    // low default value is min (min default value is 0.0).
    [ null, 0.0 ],
    [ 'foo', 0.0 ],
    [ 'foo', 1.0, 1.0],
    // If low <= min, min is used instead.
    [ -1.0, 0.0 ],
    [ 0.0, 0.5, 0.5 ],
    [ 10.0, 15.0, 15.0, 42.0 ],
    [ 42.0, 42.0, 13.37, 100.0 ],
    // If low >= max, max is used instead.
    [ 2.0, 1.0 ],
    [ 10.0, 5.0 , 0.5, 5.0 ],
    [ 13.37, 13.37, 0.0, 42.0 ],
    // Regular reflection.
    [  0.0 ],
    [  0.5 ],
    [  1.0 ],
    // Check double-precision value.
    [  0.234567898765432 ],
  ];

  var element = document.createElement('meter');

  for (var test of tests) {
    if (test[2]) {
      element.setAttribute('min', test[2]);
    }
    if (test[3]) {
      element.setAttribute('max', test[3]);
    }

    checkAttribute(element, 'low', test[0], test[1]);

    element.removeAttribute('min');
    element.removeAttribute('max');
  }
}

function checkHighAttribute()
{
  var tests = [
    // high default value is max (max default value is 1.0).
    [ null, 1.0 ],
    [ 'foo', 1.0 ],
    [ 'foo', 42.0, 0.0, 42.0],
    // If high <= min, min is used instead.
    [ -1.0, 0.0 ],
    [ 0.0, 0.5, 0.5 ],
    [ 10.0, 15.0, 15.0, 42.0 ],
    [ 42.0, 42.0, 13.37, 100.0 ],
    // If high >= max, max is used instead.
    [ 2.0, 1.0 ],
    [ 10.0, 5.0 , 0.5, 5.0 ],
    [ 13.37, 13.37, 0.0, 42.0 ],
    // Regular reflection.
    [  0.0 ],
    [  0.5 ],
    [  1.0 ],
    // Check double-precision value.
    [  0.234567898765432 ],
  ];

  var element = document.createElement('meter');

  for (var test of tests) {
    if (test[2]) {
      element.setAttribute('min', test[2]);
    }
    if (test[3]) {
      element.setAttribute('max', test[3]);
    }

    checkAttribute(element, 'high', test[0], test[1]);

    element.removeAttribute('min');
    element.removeAttribute('max');
  }
}

function checkOptimumAttribute()
{
  var tests = [
    // opt default value is (max-min)/2 (thus default value is 0.5).
    [ null, 0.5 ],
    [ 'foo', 0.5 ],
    [ 'foo', 2.0, 1.0, 3.0],
    // If opt <= min, min is used instead.
    [ -1.0, 0.0 ],
    [ 0.0, 0.5, 0.5 ],
    [ 10.0, 15.0, 15.0, 42.0 ],
    [ 42.0, 42.0, 13.37, 100.0 ],
    // If opt >= max, max is used instead.
    [ 2.0, 1.0 ],
    [ 10.0, 5.0 , 0.5, 5.0 ],
    [ 13.37, 13.37, 0.0, 42.0 ],
    // Regular reflection.
    [  0.0 ],
    [  0.5 ],
    [  1.0 ],
    // Check double-precision value.
    [  0.234567898765432 ],
  ];

  var element = document.createElement('meter');

  for (var test of tests) {
    if (test[2]) {
      element.setAttribute('min', test[2]);
    }
    if (test[3]) {
      element.setAttribute('max', test[3]);
    }

    checkAttribute(element, 'optimum', test[0], test[1]);

    element.removeAttribute('min');
    element.removeAttribute('max');
  }
}

function checkFormListedElement(aElement)
{
  is(document.forms[0].elements.length, 0, "the form should have no element");
}

function checkLabelable(aElement)
{
  var content = document.getElementById('content');
  var label = document.createElement('label');

  content.appendChild(label);
  label.appendChild(aElement);
  is(label.control, aElement, "meter should be labelable");

  // Cleaning-up.
  content.removeChild(label);
  content.appendChild(aElement);
}

function checkNotResetableAndFormSubmission(aElement)
{
  // Creating an input element to check the submission worked.
  var form = document.forms[0];
  var input = document.createElement('input');

  input.name = 'a';
  input.value = 'tulip';
  form.appendChild(input);

  // Setting values.
  aElement.value = 42.0;
  aElement.max = 100.0;

  document.getElementsByName('submit_frame')[0].addEventListener("load", function() {
    is(frames.submit_frame.location.href,
      `${location.origin}/tests/dom/html/test/forms/foo?a=tulip`,
       "The meter element value should not be submitted");

    checkNotResetable();
  }, {once: true});

  form.submit();
}

function checkNotResetable()
{
  // Try to reset the form.
  var form = document.forms[0];
  var element = document.getElementById('m');

  element.value = 3.0;
  element.max = 42.0;

  form.reset();

  SimpleTest.executeSoon(function() {
    is(element.value, 3.0, "meter.value should not have changed");
    is(element.max, 42.0, "meter.max should not have changed");

    SimpleTest.finish();
  });
}

SimpleTest.waitForExplicitFinish();

var m = document.getElementById('m');

ok(m instanceof HTMLMeterElement,
   "The meter element should be instance of HTMLMeterElement");
is(m.constructor, HTMLMeterElement,
   "The meter element constructor should be HTMLMeterElement");

// There is no such attribute.
checkFormIDLAttribute(m);

checkValueAttribute();

checkMinAttribute();

checkMaxAttribute();

checkLowAttribute();

checkHighAttribute();

checkOptimumAttribute();

checkFormListedElement(m);

checkLabelable(m);

checkNotResetableAndFormSubmission(m);

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

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

¤ Dauer der Verarbeitung: 0.10 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=1128594
#Domains=1947682