Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
1 /**
2 * Any copyright is dedicated to the Public Domain.
3 * http://creativecommons.org/publicdomain/zero/1.0/
4 */
6 function ok(cond, msg) {
7 dump("ok(" + cond + ", \"" + msg + "\")");
8 do_check_true(!!cond, Components.stack.caller);
9 }
11 function finishTest()
12 {
13 do_execute_soon(function() {
14 do_test_finished();
15 });
16 }
18 function run_test() {
19 const name = "Splendid Test";
21 Cu.importGlobalProperties(["indexedDB"]);
23 do_test_pending();
25 let keyRange = IDBKeyRange.only(42);
26 ok(keyRange, "Got keyRange");
28 let request = indexedDB.open(name, 1);
29 request.onerror = function(event) {
30 ok(false, "indexedDB error, '" + event.target.error.name + "'");
31 finishTest();
32 }
33 request.onsuccess = function(event) {
34 let db = event.target.result;
35 ok(db, "Got database");
36 finishTest();
37 }
38 }