Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/image/test/mochitest/   (Browser von der Mozilla Stiftung Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 1 kB image not shown  

Quelle  test_net_failedtoprocess.html   Sprache: HTML

 
 products/Sources/formale Sprachen/C/Firefox/image/test/mochitest/test_net_failedtoprocess.html


<!DOCTYPE HTML>
<html>
<!--
Test that a image decoding error producs a net:failed-to-process-uri-content
observer event with the nsIURI of the failed image as the subject
-->

<head>
  <title>Test for image net:failed-to-process-uri-content</title>
  <script src="/tests/SimpleTest/SimpleTest.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>
<p id="display"></p>
<pre id="test">
</pre>
<script type="application/javascript">

SimpleTest.waitForExplicitFinish();

const Ci = SpecialPowers.Ci;
const Cc = SpecialPowers.Cc;
var obs = Cc["@mozilla.org/observer-service;1"].getService();
obs = obs.QueryInterface(Ci.nsIObserverService);

var observer = {
  QueryInterface (aIID) {
    if (aIID.equals(Ci.nsISupports) ||
        aIID.equals(Ci.nsIObserver))
      return this;
    throw Components.Exception("", Cr.NS_ERROR_NO_INTERFACE);
  },

  observe(subject, topic) {
    ok(topic == "net:failed-to-process-uri-content""wrong topic");
    subject = subject.QueryInterface(Ci.nsIURI);
    is(subject.asciiSpec, `${location.origin}/tests/image/test/mochitest/invalid.jpg`"wrong subject");

    obs.removeObserver(this, "net:failed-to-process-uri-content");

    SimpleTest.finish();
  }
};

obs.addObserver(SpecialPowers.wrapCallbackObject(observer), "net:failed-to-process-uri-content");

document.write('');
document.write('');

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

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

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