Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
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 }