Thu, 15 Jan 2015 21:03:48 +0100
Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)
1 /**
2 * Any copyright is dedicated to the Public Domain.
3 * http://creativecommons.org/publicdomain/zero/1.0/
4 */
6 Components.utils.importGlobalProperties(["indexedDB"]);
8 this.EXPORTED_SYMBOLS = [
9 "GlobalObjectsModule"
10 ];
12 this.GlobalObjectsModule = function GlobalObjectsModule() {
13 }
15 GlobalObjectsModule.prototype = {
16 runTest: function() {
17 const name = "Splendid Test";
19 let ok = this.ok;
20 let finishTest = this.finishTest;
22 let keyRange = IDBKeyRange.only(42);
23 ok(keyRange, "Got keyRange");
25 let request = indexedDB.open(name, 1);
26 request.onerror = function(event) {
27 ok(false, "indexedDB error, '" + event.target.error.name + "'");
28 finishTest();
29 }
30 request.onsuccess = function(event) {
31 let db = event.target.result;
32 ok(db, "Got database");
33 finishTest();
34 }
35 }
36 }