зеркало из https://github.com/mozilla/pjs.git
s/mozIndexedDB/moz_indexedDB/ per discussions with devrel
This commit is contained in:
Родитель
d4ab96469d
Коммит
43fa7e0dc6
|
@ -19,7 +19,7 @@
|
|||
const name = window.location.pathname;
|
||||
const description = "My Test Database";
|
||||
|
||||
let request = mozIndexedDB.open(name, description);
|
||||
let request = moz_indexedDB.open(name, description);
|
||||
request.onerror = errorHandler;
|
||||
request.onsuccess = grabEventAndContinueHandler;
|
||||
let event = yield;
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
{ name: "3", keyPath: "value" },
|
||||
];
|
||||
|
||||
let request = mozIndexedDB.open(name, description);
|
||||
let request = moz_indexedDB.open(name, description);
|
||||
request.onerror = errorHandler;
|
||||
request.onsuccess = grabEventAndContinueHandler;
|
||||
let event = yield;
|
||||
|
|
|
@ -27,12 +27,12 @@
|
|||
{ name: "6", keyPath: "foo" }
|
||||
];
|
||||
|
||||
let request = mozIndexedDB.open(name, description);
|
||||
let request = moz_indexedDB.open(name, description);
|
||||
request.onerror = errorHandler;
|
||||
request.onsuccess = grabEventAndContinueHandler;
|
||||
let event = yield;
|
||||
|
||||
ok(event.source === mozIndexedDB, "event.source is correct");
|
||||
ok(event.source === moz_indexedDB, "event.source is correct");
|
||||
let db = event.result;
|
||||
|
||||
let count = db.objectStoreNames.length;
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
is(keys.length, sortedKeys.length, "Good key setup");
|
||||
|
||||
let request = mozIndexedDB.open(name, description);
|
||||
let request = moz_indexedDB.open(name, description);
|
||||
request.onerror = errorHandler;
|
||||
request.onsuccess = grabEventAndContinueHandler;
|
||||
let event = yield;
|
||||
|
@ -78,7 +78,7 @@
|
|||
|
||||
keyIndex = 4;
|
||||
|
||||
let range = mozIndexedDB.makeBoundKeyRange(2000, "q");
|
||||
let range = moz_indexedDB.makeBoundKeyRange(2000, "q");
|
||||
request = objectStore.openCursor(range);
|
||||
request.onerror = errorHandler;
|
||||
request.onsuccess = function (event) {
|
||||
|
|
|
@ -17,12 +17,12 @@
|
|||
const description = "My Test Database";
|
||||
const objectStoreName = "Objects";
|
||||
|
||||
var request = mozIndexedDB.open(name, description);
|
||||
var request = moz_indexedDB.open(name, description);
|
||||
request.onerror = errorHandler;
|
||||
request.onsuccess = grabEventAndContinueHandler;
|
||||
var event = yield;
|
||||
|
||||
ok(event.source === mozIndexedDB, "correct event.source");
|
||||
ok(event.source === moz_indexedDB, "correct event.source");
|
||||
|
||||
var db = event.result;
|
||||
request = db.createObjectStore(objectStoreName, null, true);
|
||||
|
|
|
@ -17,14 +17,14 @@
|
|||
const description = "My Test Database";
|
||||
const objectStore = { name: "Objects", keyPath: "id", autoIncr: true };
|
||||
|
||||
let request = mozIndexedDB.open(name, description);
|
||||
let request = moz_indexedDB.open(name, description);
|
||||
request.onerror = errorHandler;
|
||||
request.onsuccess = grabEventAndContinueHandler;
|
||||
let event = yield;
|
||||
|
||||
let db1 = event.result;
|
||||
|
||||
request = mozIndexedDB.open(name, description);
|
||||
request = moz_indexedDB.open(name, description);
|
||||
request.onerror = errorHandler;
|
||||
request.onsuccess = grabEventAndContinueHandler;
|
||||
event = yield;
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
{ key: "237-23-7734", value: { name: "Ron", height: 73, weight: 180 } }
|
||||
];
|
||||
|
||||
let request = mozIndexedDB.open(name, description);
|
||||
let request = moz_indexedDB.open(name, description);
|
||||
request.onerror = errorHandler;
|
||||
request.onsuccess = grabEventAndContinueHandler;
|
||||
let event = yield;
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
const name = window.location.pathname;
|
||||
const description = "My Test Database";
|
||||
|
||||
let request = mozIndexedDB.open(name, description);
|
||||
let request = moz_indexedDB.open(name, description);
|
||||
request.onerror = errorHandler;
|
||||
request.onsuccess = grabEventAndContinueHandler;
|
||||
let event = yield;
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
const name = window.location.pathname;
|
||||
const description = "My Test Database";
|
||||
|
||||
let request = mozIndexedDB.open(name, description);
|
||||
let request = moz_indexedDB.open(name, description);
|
||||
request.onerror = errorHandler;
|
||||
request.onsuccess = grabEventAndContinueHandler;
|
||||
let event = yield;
|
||||
|
|
|
@ -19,7 +19,7 @@ function testSteps()
|
|||
const name = window.location.pathname;
|
||||
const description = "My Test Database";
|
||||
|
||||
var request = mozIndexedDB.open(name, description);
|
||||
var request = moz_indexedDB.open(name, description);
|
||||
request.onerror = errorHandler;
|
||||
request.onsuccess = grabEventAndContinueHandler;
|
||||
var event = yield;
|
||||
|
|
|
@ -19,7 +19,7 @@ function testSteps()
|
|||
const name = window.location.pathname;
|
||||
const description = "My Test Database";
|
||||
|
||||
var request = mozIndexedDB.open(name, description);
|
||||
var request = moz_indexedDB.open(name, description);
|
||||
request.onerror = errorHandler;
|
||||
request.onsuccess = grabEventAndContinueHandler;
|
||||
var event = yield;
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
let request;
|
||||
|
||||
try {
|
||||
request = mozIndexedDB.open("", "");
|
||||
request = moz_indexedDB.open("", "");
|
||||
ok(false, "Open with empty name should have thrown!");
|
||||
}
|
||||
catch(e) {
|
||||
|
@ -27,14 +27,14 @@
|
|||
}
|
||||
|
||||
try {
|
||||
request = mozIndexedDB.open(null, "");
|
||||
request = moz_indexedDB.open(null, "");
|
||||
ok(false, "Open with null name should have thrown!");
|
||||
}
|
||||
catch(e) {
|
||||
is(request, undefined, "Shouldn't be set to anything");
|
||||
}
|
||||
|
||||
request = mozIndexedDB.open(name, description);
|
||||
request = moz_indexedDB.open(name, description);
|
||||
request.onerror = errorHandler;
|
||||
request.onsuccess = grabEventAndContinueHandler;
|
||||
let event = yield;
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
const description = "My Test Database";
|
||||
const objectStoreName = "Objects";
|
||||
|
||||
let request = mozIndexedDB.open(name, description);
|
||||
let request = moz_indexedDB.open(name, description);
|
||||
request.onerror = errorHandler;
|
||||
request.onsuccess = grabEventAndContinueHandler;
|
||||
let event = yield;
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
const description = "My Test Database";
|
||||
const objectStores = [ "foo", "bar" ];
|
||||
|
||||
let request = mozIndexedDB.open(name, description);
|
||||
let request = moz_indexedDB.open(name, description);
|
||||
request.onerror = errorHandler;
|
||||
request.onsuccess = grabEventAndContinueHandler;
|
||||
let event = yield;
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
let testString = { key: 0, value: "testString" };
|
||||
let testInt = { key: 1, value: 1002 };
|
||||
|
||||
let request = mozIndexedDB.open(name, description);
|
||||
let request = moz_indexedDB.open(name, description);
|
||||
request.onerror = errorHandler;
|
||||
request.onsuccess = grabEventAndContinueHandler;
|
||||
let event = yield;
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
let testString = { value: "testString" };
|
||||
let testInt = { value: 1002 };
|
||||
|
||||
let request = mozIndexedDB.open(name, description);
|
||||
let request = moz_indexedDB.open(name, description);
|
||||
request.onerror = errorHandler;
|
||||
request.onsuccess = grabEventAndContinueHandler;
|
||||
let event = yield;
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
const description = "My Test Database";
|
||||
const osName = "foo";
|
||||
|
||||
let request = mozIndexedDB.open(name, description);
|
||||
let request = moz_indexedDB.open(name, description);
|
||||
request.onerror = errorHandler;
|
||||
request.onsuccess = grabEventAndContinueHandler;
|
||||
let event = yield;
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
const description = "My Test Database";
|
||||
const indexName = "My Test Index";
|
||||
|
||||
let request = mozIndexedDB.open(name, description);
|
||||
let request = moz_indexedDB.open(name, description);
|
||||
request.onerror = errorHandler;
|
||||
request.onsuccess = grabEventAndContinueHandler;
|
||||
let event = yield;
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
const description = "My Test Database";
|
||||
const objectStoreName = "Objects";
|
||||
|
||||
let request = mozIndexedDB.open(name, description);
|
||||
let request = moz_indexedDB.open(name, description);
|
||||
request.onerror = errorHandler;
|
||||
request.onsuccess = grabEventAndContinueHandler;
|
||||
let event = yield;
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
const LOADING = Components.interfaces.nsIIDBRequest.LOADING;
|
||||
const DONE = Components.interfaces.nsIIDBRequest.DONE;
|
||||
|
||||
let request = mozIndexedDB.open(name, description);
|
||||
let request = moz_indexedDB.open(name, description);
|
||||
is(request.readyState, LOADING, "Correct readyState");
|
||||
|
||||
request.onerror = errorHandler;
|
||||
|
|
|
@ -17,7 +17,7 @@ function testSteps()
|
|||
const name = window.location.pathname;
|
||||
const description = "My Test Database";
|
||||
|
||||
var request = mozIndexedDB.open(name, description);
|
||||
var request = moz_indexedDB.open(name, description);
|
||||
request.onerror = errorHandler;
|
||||
request.onsuccess = grabEventAndContinueHandler;
|
||||
var event = yield;
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
const description = "My Test Database";
|
||||
|
||||
|
||||
let request = mozIndexedDB.open(name, description);
|
||||
let request = moz_indexedDB.open(name, description);
|
||||
request.onerror = errorHandler;
|
||||
request.onsuccess = grabEventAndContinueHandler;
|
||||
let event = yield;
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
const name = window.location.pathname;
|
||||
const description = "My Test Database";
|
||||
|
||||
let request = mozIndexedDB.open(name, description);
|
||||
let request = moz_indexedDB.open(name, description);
|
||||
request.onerror = errorHandler;
|
||||
request.onsuccess = grabEventAndContinueHandler;
|
||||
let event = yield;
|
||||
|
|
|
@ -71,5 +71,5 @@ interface nsIDOMStorageWindow : nsISupports
|
|||
/**
|
||||
* Indexed Databases for the current browsing context.
|
||||
*/
|
||||
readonly attribute nsIIndexedDatabaseRequest mozIndexedDB;
|
||||
readonly attribute nsIIndexedDatabaseRequest moz_indexedDB;
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче