Bug 1816170 - Disable perftest-on-autoland cron. r=aglavic
[gecko.git] / dom / indexedDB / test / unit / GlobalObjectsChild.js
blob11b0c440f619a6dfcc6cc4713ab1e9f330dcdc3f
1 /**
2  * Any copyright is dedicated to the Public Domain.
3  * http://creativecommons.org/publicdomain/zero/1.0/
4  */
6 /* import-globals-from xpcshell-head-parent-process.js */
8 function ok(cond, msg) {
9   dump("ok(" + cond + ', "' + msg + '")');
10   Assert.ok(!!cond, Components.stack.caller);
13 function finishTest() {
14   executeSoon(function() {
15     do_test_finished();
16   });
19 function run_test() {
20   const name = "Splendid Test";
22   Cu.importGlobalProperties(["indexedDB"]);
24   do_test_pending();
26   let keyRange = IDBKeyRange.only(42);
27   ok(keyRange, "Got keyRange");
29   let request = indexedDB.open(name, 1);
30   request.onerror = function(event) {
31     ok(false, "indexedDB error, '" + event.target.error.name + "'");
32     finishTest();
33   };
34   request.onsuccess = function(event) {
35     let db = event.target.result;
36     ok(db, "Got database");
37     finishTest();
38   };