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

Quelle  test_bug802872.html   Sprache: HTML

 
 products/Sources/formale Sprachen/C/Firefox/dom/security/test/csp/test_bug802872.html


<!DOCTYPE HTML>
<html>
<head>
  <title>Bug 802872</title>
  <!-- Including SimpleTest.js so we can use waitForExplicitFinish !-->
  <script src="/tests/SimpleTest/SimpleTest.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>
  <p id="display"></p>
  <div id="content" style="display: none"></div>
  <iframe style="width:100%;" id='eventframe'></iframe>

<script class="testbody" type="text/javascript">

SimpleTest.waitForExplicitFinish();

var finishedTests = 0;
var numberOfTests = 2;

var checkExplicitFinish = function () {
  finishedTests++;
  if (finishedTests == numberOfTests) {
     SimpleTest.finish();
  }
}

// add event listeners for CSP-permitted EventSrc callbacks
addEventListener('allowedEventSrcCallbackOK', function (e) {
  ok(true, "OK: CSP allows EventSource for allowlisted domain!");
  checkExplicitFinish();
}, false);
addEventListener('allowedEventSrcCallbackFailed', function (e) {
  ok(false, "Error: CSP blocks EventSource for allowlisted domain!");
  checkExplicitFinish();
}, false);

// add event listeners for CSP-blocked EventSrc callbacks
addEventListener('blockedEventSrcCallbackOK', function (e) {
  ok(false, "Error: CSP allows EventSource to not allowlisted domain!");
  checkExplicitFinish();
}, false);
addEventListener('blockedEventSrcCallbackFailed', function (e) {
  ok(true, "OK: CSP blocks EventSource for not allowlisted domain!");
  checkExplicitFinish();
}, false);

// load it
document.getElementById('eventframe').src = 'file_bug802872.html';

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

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

¤ 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.