dom/devicestorage/test/test_available.html

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

     1 <!--
     2   Any copyright is dedicated to the Public Domain.
     3   http://creativecommons.org/publicdomain/zero/1.0/
     4 -->
     5 <!DOCTYPE HTML>
     6 <html> <!--
     7 https://bugzilla.mozilla.org/show_bug.cgi?id=834595
     8 -->
     9 <head>
    10   <title>Test for the device storage API </title>
    11   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
    12   <script type="text/javascript" src="devicestorage_common.js"></script>
    14 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
    15 </head>
    16 <body>
    17 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=834595">Mozilla Bug 834595</a>
    18 <p id="display"></p>
    19 <div id="content" style="display: none">
    21 </div>
    22 <pre id="test">
    23 <script class="testbody" type="text/javascript">
    25 devicestorage_setup();
    27 function availableSuccess(e) {
    28   isnot(e.target.result, null, "result should not be null");
    29   devicestorage_cleanup();
    30 }
    32 function availableError(e) {
    33   ok(false, "availableError was called");
    34   devicestorage_cleanup();
    35 }
    37 var storage = navigator.getDeviceStorage("pictures");
    39 request = storage.available();
    40 ok(request, "Should have a non-null request");
    42 request.onsuccess = availableSuccess;
    43 request.onerror = availableError;
    45 </script>
    46 </pre>
    47 </body>
    48 </html>

mercurial