dom/tests/mochitest/crypto/test_no_legacy.html

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

     1 <!DOCTYPE HTML>
     2 <html>
     3 <head>
     4   <title>Test lack of legacy window.crypto features when
     5          MOZ_DISABLE_CRYPTOLEGACY is set</title>
     6   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>        
     7   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
     8 </head>
     9 <body>
    10 <script class="testbody" type="text/javascript">
    12 ok("crypto" in window, "crypto in window");
    13 ok(!("version" in window.crypto), "version not in window.crypto");
    14 ok(!("enableSmartCardEvents" in window.crypto),
    15    "enableSmartCardEvents not in window.crypto");
    16 ok(!("generateCRMFRequest" in window.crypto),
    17    "generateCRMFRequest not in window.crypto");
    18 ok(!("importUserCertificates" in window.crypto),
    19    "importUserCertificates not in window.crypto");
    20 ok(!("signText" in window.crypto), "signText not in window.crypto");
    22 </script>
    23 </body></html>

mercurial