webapprt/test/content/webapprt_indexeddb.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/webapprt/test/content/webapprt_indexeddb.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,38 @@
     1.4 +<!DOCTYPE HTML>
     1.5 +
     1.6 +<!--
     1.7 +  This is a IndexedDB WebappRT content mochitest.  Since its name is prefixed with
     1.8 +  webapprt_, this file is picked up by the Mochitest harness.  It's just a plain
     1.9 +  mochitest that runs in the app browser within an app window.
    1.10 +-->
    1.11 +
    1.12 +<html>
    1.13 +  <head>
    1.14 +    <meta charset="utf-8">
    1.15 +    <script src="/tests/SimpleTest/SimpleTest.js"></script>
    1.16 +    <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
    1.17 +  </head>
    1.18 +  <body>
    1.19 +    <p id="display">
    1.20 +      This is the IndexedDB WebappRT content mochitest.
    1.21 +    </p>
    1.22 +    <div id="content" style="display: none"></div>
    1.23 +    <pre id="test">
    1.24 +      <script>
    1.25 +
    1.26 +SimpleTest.waitForExplicitFinish();
    1.27 +
    1.28 +var request = indexedDB.open('test');
    1.29 +request.onsuccess = function() {
    1.30 +  ok(true, "onsuccess should be called");
    1.31 +  SimpleTest.finish();
    1.32 +}
    1.33 +request.onerror = function() {
    1.34 +  ok(false, "onerror shouldn't be called");
    1.35 +  SimpleTest.finish();
    1.36 +}
    1.37 +
    1.38 +      </script>
    1.39 +    </pre>
    1.40 +  </body>
    1.41 +</html>

mercurial