mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-01 05:43:46 +00:00
s/indexedDB/mozIndexedDB/
This commit is contained in:
parent
8ef0cc88ae
commit
1f64c05edb
@ -7555,7 +7555,7 @@ nsGlobalWindow::GetLocalStorage(nsIDOMStorage ** aLocalStorage)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsGlobalWindow::GetIndexedDB(nsIIndexedDatabaseRequest** _retval)
|
||||
nsGlobalWindow::GetMozIndexedDB(nsIIndexedDatabaseRequest** _retval)
|
||||
{
|
||||
if (!mIndexedDB) {
|
||||
mIndexedDB = mozilla::dom::indexedDB::IndexedDatabaseRequest::Create();
|
||||
|
@ -19,7 +19,7 @@
|
||||
const name = window.location.pathname;
|
||||
const description = "My Test Database";
|
||||
|
||||
let request = indexedDB.open(name, description);
|
||||
let request = mozIndexedDB.open(name, description);
|
||||
request.onerror = errorHandler;
|
||||
request.onsuccess = grabEventAndContinueHandler;
|
||||
let event = yield;
|
||||
|
@ -28,7 +28,7 @@
|
||||
{ name: "3", keyPath: "value" },
|
||||
];
|
||||
|
||||
let request = indexedDB.open(name, description);
|
||||
let request = mozIndexedDB.open(name, description);
|
||||
request.onerror = errorHandler;
|
||||
request.onsuccess = grabEventAndContinueHandler;
|
||||
let event = yield;
|
||||
|
@ -27,12 +27,12 @@
|
||||
{ name: "6", keyPath: "foo" }
|
||||
];
|
||||
|
||||
let request = indexedDB.open(name, description);
|
||||
let request = mozIndexedDB.open(name, description);
|
||||
request.onerror = errorHandler;
|
||||
request.onsuccess = grabEventAndContinueHandler;
|
||||
let event = yield;
|
||||
|
||||
ok(event.source === indexedDB, "event.source is correct");
|
||||
ok(event.source === mozIndexedDB, "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 = indexedDB.open(name, description);
|
||||
let request = mozIndexedDB.open(name, description);
|
||||
request.onerror = errorHandler;
|
||||
request.onsuccess = grabEventAndContinueHandler;
|
||||
let event = yield;
|
||||
@ -78,7 +78,7 @@
|
||||
|
||||
keyIndex = 4;
|
||||
|
||||
let range = indexedDB.makeBoundKeyRange(2000, "q");
|
||||
let range = mozIndexedDB.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 = indexedDB.open(name, description);
|
||||
var request = mozIndexedDB.open(name, description);
|
||||
request.onerror = errorHandler;
|
||||
request.onsuccess = grabEventAndContinueHandler;
|
||||
var event = yield;
|
||||
|
||||
ok(event.source === indexedDB, "correct event.source");
|
||||
ok(event.source === mozIndexedDB, "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 = indexedDB.open(name, description);
|
||||
let request = mozIndexedDB.open(name, description);
|
||||
request.onerror = errorHandler;
|
||||
request.onsuccess = grabEventAndContinueHandler;
|
||||
let event = yield;
|
||||
|
||||
let db1 = event.result;
|
||||
|
||||
request = indexedDB.open(name, description);
|
||||
request = mozIndexedDB.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 = indexedDB.open(name, description);
|
||||
let request = mozIndexedDB.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 = indexedDB.open(name, description);
|
||||
let request = mozIndexedDB.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 = indexedDB.open(name, description);
|
||||
let request = mozIndexedDB.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 = indexedDB.open(name, description);
|
||||
var request = mozIndexedDB.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 = indexedDB.open(name, description);
|
||||
var request = mozIndexedDB.open(name, description);
|
||||
request.onerror = errorHandler;
|
||||
request.onsuccess = grabEventAndContinueHandler;
|
||||
var event = yield;
|
||||
|
@ -19,7 +19,7 @@
|
||||
let request;
|
||||
|
||||
try {
|
||||
request = indexedDB.open("", "");
|
||||
request = mozIndexedDB.open("", "");
|
||||
ok(false, "Open with empty name should have thrown!");
|
||||
}
|
||||
catch(e) {
|
||||
@ -27,14 +27,14 @@
|
||||
}
|
||||
|
||||
try {
|
||||
request = indexedDB.open(null, "");
|
||||
request = mozIndexedDB.open(null, "");
|
||||
ok(false, "Open with null name should have thrown!");
|
||||
}
|
||||
catch(e) {
|
||||
is(request, undefined, "Shouldn't be set to anything");
|
||||
}
|
||||
|
||||
request = indexedDB.open(name, description);
|
||||
request = mozIndexedDB.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 = indexedDB.open(name, description);
|
||||
let request = mozIndexedDB.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 = indexedDB.open(name, description);
|
||||
let request = mozIndexedDB.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 = indexedDB.open(name, description);
|
||||
let request = mozIndexedDB.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 = indexedDB.open(name, description);
|
||||
let request = mozIndexedDB.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 = indexedDB.open(name, description);
|
||||
let request = mozIndexedDB.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 = indexedDB.open(name, description);
|
||||
let request = mozIndexedDB.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 = indexedDB.open(name, description);
|
||||
let request = mozIndexedDB.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 = indexedDB.open(name, description);
|
||||
let request = mozIndexedDB.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 = indexedDB.open(name, description);
|
||||
var request = mozIndexedDB.open(name, description);
|
||||
request.onerror = errorHandler;
|
||||
request.onsuccess = grabEventAndContinueHandler;
|
||||
var event = yield;
|
||||
|
@ -26,7 +26,7 @@
|
||||
const description = "My Test Database";
|
||||
|
||||
|
||||
let request = indexedDB.open(name, description);
|
||||
let request = mozIndexedDB.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 = indexedDB.open(name, description);
|
||||
let request = mozIndexedDB.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 indexedDB;
|
||||
readonly attribute nsIIndexedDatabaseRequest mozIndexedDB;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user