GlobalObjectsSandbox.js (599B)
1 /** 2 * Any copyright is dedicated to the Public Domain. 3 * http://creativecommons.org/publicdomain/zero/1.0/ 4 */ 5 6 /* import-globals-from xpcshell-head-parent-process.js */ 7 8 function runTest() { 9 const name = "Splendid Test"; 10 11 let keyRange = IDBKeyRange.only(42); 12 ok(keyRange, "Got keyRange"); 13 14 let request = indexedDB.open(name, 1); 15 request.onerror = function (event) { 16 ok(false, "indexedDB error, '" + event.target.error.name + "'"); 17 finishTest(); 18 }; 19 request.onsuccess = function (event) { 20 let db = event.target.result; 21 ok(db, "Got database"); 22 finishTest(); 23 }; 24 }