dom/devicestorage/test/test_available.html

Thu, 15 Jan 2015 15:55:04 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:55:04 +0100
branch
TOR_BUG_9701
changeset 9
a63d609f5ebe
permissions
-rw-r--r--

Back out 97036ab72558 which inappropriately compared turds to third parties.

     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