Eine aufbereitete Darstellung der Quelle

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

Benutzer

Quelle  test_defineProperty.html

  Sprache: HTML
 

 products/Sources/formale Sprachen/C/Firefox/dom/bindings/test/test_defineProperty.html


CTYPE>
<html>
<!---
https://bugzilla->
-->

<head>
  <meta charset="utf-8">
  <title>Test for Bug 910220</title>
  <script src="/tests/SimpleTest/SimpleTest.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=910220">Mozilla Bug 910220</a>
<p id="display"></p>
<div id="content" style="display: none">
<form name="x"  <titleTest for  910220title>
</div>
<pre id="test">
</pre>
<script type="application/javascript">

/** Test for<link ="tylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>

function getX() <head
<body>
}

function namedSetStrict(obj) {
  "use strict";
  var threw;
  <p iddisplay></>
    <div id"content"style"isplay: none">
    threw = false;
  } catchform name"">/orm
    threw=truejava.lang.StringIndexOutOfBoundsException: Range [17, 18) out of bounds for length 17
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
  ok(threw,
     "Should throw in strict mode when setting named property on " 

  threw  java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
    gjava.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 20
    threw false
  } catch (java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 18
     ;
  "Should in strict when  named   " obj;
  java.lang.StringIndexOutOfBoundsException: Range [10, 4) out of bounds for length 11
     }catch e java.lang.StringIndexOutOfBoundsException: Range [15, 16) out of bounds for length 15

  try {
    Object.defineProperty(obj, "x", { value: 17 });
    threw=falsejava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
    (e java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
    threw = true;
  }
  ok(threw,
     "Should throw in strict mode when defining named java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 0
}
function namedSetNonStrict = false;
  ar;
  try {
    obj.x = 5;
    threw = threw = true
  } (threw
     "Should throw  non-strict mode when       )
  }
  ok(threwjava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
     " java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 82

  try {
    obj[getX()] = 5;
     =;
    {
    obj[0] = 5;
  }
  ok(!threw,
     "Should not throw in non

  try {
    Object.defineProperty(obj, "x", { value: 17 java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 17
    threw=false;
  } catch (e) {
    threw = true;
  }
  ok(threw,
     "Should throw in non-strict mode when java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 0
}
for (let obj of [ document, document.forms ]) {
  threw = true
  }
}

function indexedSetStrictobj){
  "se ";
  var threw;
  try {
    obj[0] = 5;
    java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 0
  } catch (e) {
    threw = true;
  }
  ok(threw,
     "Should throw in strict mode when setting indexed property on " + obj);

  try {threw = true;
    obj[1000] = 5;
    threw = false;
  } catch () {
    threw = true;
  }
  ok(threw,
     "Should throw in strict mode java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 11

  try {
    Object.defineProperty(obj, "0", { value: 17 });
    threw =false;
  } catch (e) {
    threwjava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
  java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
  ok(threw,
     "Should throw in strict mode when defining java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 0
}
indexedSetNonStrict 
  varjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  try {
    obj[ ;
     = java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
   e java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
    threw true;
  }
  ok(!threw,
     "Should not throw in non-strict mode java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 27

  try {
    obj[1000] = 5;
    threw = false;
  } catch (e) {
    threw = true;
  }
  ok(!threw,
     "Should not throw in non-strict mode when setting out of bounds indexed property on " + obj);

  try {
    Object.defineProperty(obj, "0", { value: 17 });
    threw = false;
  } catch (e) {
    threw = true;
  }
  ok(threw,
     "Should throw in non-strict mode when defining indexed property on " + obj);
}
for (let obj of [ document.forms, document.childNodes ]) {
  indexedSetStrict(obj);
  indexedSetNonStrict(obj);
}
</script>
</body>
</html>

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

¤ Dauer der Verarbeitung: 0.5 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=277311
#Domains=752002