Eine aufbereitete Darstellung der Quelle

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

Benutzer

Quelle  test_secureContexts.html

  Sprache: HTML
 

 products/Sources/formale Sprachen/C/Firefox/js/xpconnect/tests/chrome/test_secureContexts.html


<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=1273687
-->

<head>
  <meta charset="utf-8">
  <title>Test for Bug 1430164</title>
  <script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
  <link rel="stylesheet" type="text/css" href="chrome://global/skin"/>
  <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
  <iframe id="t" src="https://example.com"></iframe>
  <iframe id="i" src="http://example.com"></iframe>
  <script type="application/javascript">
  /** Test for Bug 1273687 */
  SimpleTest.waitForExplicitFinish();

  window.onload = () => {
    /* globals t, i */
    runTest(t, true);
    runTest(i, false);

    // Check we can inherit the system principal
    var s = new Cu.Sandbox(window, { wantGlobalProperties: ["isSecureContext"] } );
    s.ok = ok;
    Cu.evalInSandbox('ok(isSecureContext)'s);

    // Check options insecure works
    let sb = new Cu.Sandbox('https://www.example.com',
                            { forceSecureContext: false,
                              wantGlobalProperties:
                              ["isSecureContext"]
                            });
    ok(!Cu.evalInSandbox('isSecureContext', sb));

    // Check options secure works
    let sb2 = new Cu.Sandbox('https://www.example.com',
                            { forceSecureContext: true,
                              wantGlobalProperties:
                              ["isSecureContext"]
                            });
    ok(Cu.evalInSandbox('isSecureContext', sb2));
    SimpleTest.finish();
  };

  // Check dom window inheritance works
  function runTest(ifr, expectIsSecureContext) {
    let frameWin = ifr.contentWindow;
    let s = new Cu.Sandbox(frameWin, { wantGlobalProperties: ["isSecureContext"] });
    is(expectIsSecureContext, Cu.evalInSandbox('isSecureContext's));

    // Ensure the implementation of 'wantGlobalProperties' matches the DOM window prototype
    let s2 = new Cu.Sandbox(frameWin, { sandboxPrototype: frameWin });
    is(expectIsSecureContext, Cu.evalInSandbox('isSecureContext', s2));
  }
  </script>
</head>
</html>

Messung V0.5 in Prozent
C=95 H=90 G=92

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