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


Quelle  test_nestedSyncXHR.html   Sprache: HTML

 
 products/sources/formale Sprachen/C/Firefox/dom/xhr/tests/test_nestedSyncXHR.html


<!DOCTYPE HTML>
<html>
<head>
  <meta charset="utf-8">
  <title>Test for sync XHR into sync XHRs</title>
  <script src="/tests/SimpleTest/SimpleTest.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<body>
  <script type="application/javascript">


let xhr = new XMLHttpRequest();
let testCompleted = false;

let frame = document.createElement('frame');
frame.addEventListener('load', function() {
  if (testCompleted) {
    return;
  }

  try {
    xhr.responseType = "blob";
    ok(false, "xhr.responseType cannot be settable");
  } catch(e) {
    ok(true, "xhr.responseType cannot be settable");
  }

  try {
    xhr.abort();
    ok(false, "xhr.abort should throw");
  } catch(e) {
    ok(true, "xhr.abort should throw");
  }

  try {
    xhr.getAllResponseHeaders();
    ok(false, "xhr.getAllResponseHeaders should throw");
  } catch(e) {
    ok(true, "xhr.getAllResponseHeaders should throw");
  }

  try {
    xhr.getResponseHeader("foo");
    ok(false, "xhr.getResponseHeader should throw");
  } catch(e) {
    ok(true, "xhr.getResponseHeader should throw");
  }

  try {
    xhr.open('POST', location, false);
    ok(false, "xhr.open should throw");
  } catch(e) {
    ok(true, "xhr.open should throw");
  }

  try {
    xhr.send();
    ok(false, "xhr.send should throw");
  } catch(e) {
    ok(true, "xhr.send should throw");
  }

  try {
    xhr.timeout = 42;
    ok(false, "xhr.timeout cannot be settable");
  } catch(e) {
    ok(true, "xhr.timeout cannot be settable");
  }

  try {
    xhr.withCredentials = false;
    ok(false, "xhr.withCredentials cannot be settable");
  } catch(e) {
    ok(true, "xhr.withCredentials cannot be settable");
  }

  try {
    xhr.overrideMimeType("wow")
    ok(false, "xhr.overrideMimeType should throw");
  } catch(e) {
    ok(true, "xhr.overrideMimeType should throw");
  }
}, { once: true });

// This test is racy because we try to check that the loading of the frame
// happens during a sync XHR. If the loading happens after, we still need to
// consider the test passed.
ok(xhr, "We have an XHR.");

document.documentElement.appendChild(frame);
xhr.open('POST', location, false);
xhr.send('X');

// Nothing can guarantee that the frame is loaded during the sync XHR.
testCompleted = true;

frame.remove();
  </script>
</body>
</html>

Messung V0.5
C=94 H=96 G=94

¤ 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