Bug 619182 - Convert moz_indexedDB to mozIndexedDB. Tests. r=sicking a=blocking2.0

This commit is contained in:
Doug Turner 2011-01-03 12:03:06 -08:00
Родитель a0b5065fc2
Коммит 3678f82a54
45 изменённых файлов: 52 добавлений и 52 удалений

Просмотреть файл

@ -2,7 +2,7 @@
<html>
<head>
<script>
moz_indexedDB.open(parent.location).onsuccess = function(e) {
mozIndexedDB.open(parent.location).onsuccess = function(e) {
var db = e.result;
// This should never be called
db.onversionchange = function(e) {

Просмотреть файл

@ -3,7 +3,7 @@
<head>
<script>
var res = {};
moz_indexedDB.open(parent.location).onsuccess = function(e) {
mozIndexedDB.open(parent.location).onsuccess = function(e) {
var db = e.result;
res.version = db.version;
res.storeCount = db.objectStoreNames.length;

Просмотреть файл

@ -12,7 +12,7 @@
const name = window.location.pathname;
const description = "My Test Database";
let request = moz_indexedDB.open(name, description);
let request = mozIndexedDB.open(name, description);
request.onerror = grabEventAndContinueHandler;
request.onsuccess = grabEventAndContinueHandler;
let event = yield;

Просмотреть файл

@ -55,7 +55,7 @@
window.addEventListener("indexedDB-addMore", onAddMore, true);
window.addEventListener("indexedDB-done", onDone, true);
let request = moz_indexedDB.open(name, description);
let request = mozIndexedDB.open(name, description);
request.onerror = errorHandler;
request.onsuccess = grabEventAndContinueHandler;
let event = yield;

Просмотреть файл

@ -56,7 +56,7 @@
.add(uri, "indexedDB",
Components.interfaces.nsIPermissionManager.ALLOW_ACTION);
let request = moz_indexedDB.open(window.location.pathname);
let request = mozIndexedDB.open(window.location.pathname);
request.onerror = errorHandler;
request.onsuccess = grabEventAndContinueHandler;
let event = yield;

Просмотреть файл

@ -95,7 +95,7 @@
.add(uri, "indexedDB",
Components.interfaces.nsIPermissionManager.ALLOW_ACTION);
let request = moz_indexedDB.open(window.location.pathname);
let request = mozIndexedDB.open(window.location.pathname);
request.onerror = errorHandler;
request.onsuccess = grabEventAndContinueHandler;
let event = yield;

Просмотреть файл

@ -60,7 +60,7 @@
.add(uri, "indexedDB",
Components.interfaces.nsIPermissionManager.ALLOW_ACTION);
let request = moz_indexedDB.open(window.location.pathname);
let request = mozIndexedDB.open(window.location.pathname);
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 = moz_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 = moz_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 entryCount = 1000;
let request = moz_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", options: { unique: false } },
];
let request = moz_indexedDB.open(name, description);
let request = mozIndexedDB.open(name, description);
request.onerror = errorHandler;
request.onsuccess = grabEventAndContinueHandler;
let event = yield;

Просмотреть файл

@ -32,12 +32,12 @@
{ name: "11", options: { keyPath: "foo", autoIncrement: true } }
];
let request = moz_indexedDB.open(name, description);
let request = mozIndexedDB.open(name, description);
request.onerror = errorHandler;
request.onsuccess = grabEventAndContinueHandler;
let event = yield;
ok(event.source === moz_indexedDB, "event.source is correct");
ok(event.source === mozIndexedDB, "event.source is correct");
let db = event.result;
let count = db.objectStoreNames.length;

Просмотреть файл

@ -30,7 +30,7 @@
// Post-add and post-remove data ordered by name.
const objectStoreDataNameSort = [ 1, 4, 5, 2, 3 ];
let request = moz_indexedDB.open(window.location.pathname);
let request = mozIndexedDB.open(window.location.pathname);
request.onerror = errorHandler;
request.onsuccess = grabEventAndContinueHandler;
let event = yield;

Просмотреть файл

@ -31,7 +31,7 @@
entry: { data: START_DATA } },
];
let request = moz_indexedDB.open(name, description);
let request = mozIndexedDB.open(name, description);
request.onerror = errorHandler;
request.onsuccess = grabEventAndContinueHandler;
let event = yield;

Просмотреть файл

@ -20,7 +20,7 @@
is(keys.length, sortedKeys.length, "Good key setup");
let request = moz_indexedDB.open(name, description);
let request = mozIndexedDB.open(name, description);
request.onerror = errorHandler;
request.onsuccess = grabEventAndContinueHandler;
let event = yield;

Просмотреть файл

@ -17,12 +17,12 @@
const description = "My Test Database";
const objectStoreName = "Objects";
var request = moz_indexedDB.open(name, description);
var request = mozIndexedDB.open(name, description);
request.onerror = errorHandler;
request.onsuccess = grabEventAndContinueHandler;
var event = yield;
ok(event.source === moz_indexedDB, "correct event.source");
ok(event.source === mozIndexedDB, "correct event.source");
var db = event.result;

Просмотреть файл

@ -18,7 +18,7 @@
const values = [ "a", "1", 1, "foo", 300, true, false, 4.5, null ];
let request = moz_indexedDB.open(name, description);
let request = mozIndexedDB.open(name, description);
request.onerror = errorHandler;
request.onsuccess = grabEventAndContinueHandler;
let event = yield;

Просмотреть файл

@ -18,7 +18,7 @@
const objectStore = { name: "Objects",
options: { keyPath: "id", autoIncrement: true } };
let request = moz_indexedDB.open(name, description);
let request = mozIndexedDB.open(name, description);
request.onerror = errorHandler;
request.onsuccess = grabEventAndContinueHandler;
let event = yield;
@ -37,7 +37,7 @@
continueToNextStep();
yield;
request = moz_indexedDB.open(name, description);
request = mozIndexedDB.open(name, description);
request.onerror = errorHandler;
request.onsuccess = grabEventAndContinueHandler;
event = yield;

Просмотреть файл

@ -58,7 +58,7 @@
{ key: "237-23-7734", value: { name: "Ron", height: 73, weight: 180 } }
];
let request = moz_indexedDB.open(name, description);
let request = mozIndexedDB.open(name, description);
request.onerror = errorHandler;
request.onsuccess = grabEventAndContinueHandler;
let event = yield;

Просмотреть файл

@ -58,7 +58,7 @@
{ key: "237-23-7734", value: { name: "Ron", height: 73, weight: 180 } }
];
let request = moz_indexedDB.open(name, description);
let request = mozIndexedDB.open(name, description);
request.onerror = errorHandler;
request.onsuccess = grabEventAndContinueHandler;
let event = yield;

Просмотреть файл

@ -30,7 +30,7 @@
{ ss: "237-23-7733", name: "Bob", height: 65 }
];
let request = moz_indexedDB.open(window.location.pathname);
let request = mozIndexedDB.open(window.location.pathname);
request.onerror = errorHandler;
request.onsuccess = grabEventAndContinueHandler;
let event = yield;

Просмотреть файл

@ -69,7 +69,7 @@
{ key: "237-23-7734", value: { name: "Ron", height: 73, weight: 180 } }
];
let request = moz_indexedDB.open(name, description);
let request = mozIndexedDB.open(name, description);
request.onerror = errorHandler;
request.onsuccess = grabEventAndContinueHandler;
let event = yield;

Просмотреть файл

@ -49,7 +49,7 @@
{ key: "237-23-7734", value: { name: "Ron", height: 73, weight: 180 } }
];
let request = moz_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 = moz_indexedDB.open(name, description);
let request = mozIndexedDB.open(name, description);
request.onerror = errorHandler;
request.onsuccess = grabEventAndContinueHandler;
let event = yield;

Просмотреть файл

@ -26,7 +26,7 @@
{ name: "b", options: { unique: true } }
];
let request = moz_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 = moz_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 = moz_indexedDB.open(name, description);
var request = mozIndexedDB.open(name, description);
request.onerror = errorHandler;
request.onsuccess = grabEventAndContinueHandler;
var event = yield;

Просмотреть файл

@ -13,7 +13,7 @@
<script type="text/javascript;version=1.7">
function testSteps()
{
let request = moz_indexedDB.open(window.location.pathname, "");
let request = mozIndexedDB.open(window.location.pathname, "");
request.onerror = errorHandler;
request.onsuccess = grabEventAndContinueHandler;
let event = yield;

Просмотреть файл

@ -19,7 +19,7 @@
let request;
try {
request = moz_indexedDB.open("", "");
request = mozIndexedDB.open("", "");
ok(false, "Open with empty name should have thrown!");
}
catch(e) {
@ -29,7 +29,7 @@
}
try {
request = moz_indexedDB.open(null, "");
request = mozIndexedDB.open(null, "");
ok(false, "Open with null name should have thrown!");
}
catch(e) {
@ -38,7 +38,7 @@
is(request, undefined, "Shouldn't be set to anything");
}
request = moz_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 = moz_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 = moz_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 = moz_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 = moz_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 = moz_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 = moz_indexedDB.open(name, description);
let request = mozIndexedDB.open(name, description);
request.onerror = errorHandler;
request.onsuccess = grabEventAndContinueHandler;
let event = yield;

Просмотреть файл

@ -21,7 +21,7 @@
const description = "My Test Database";
const objectStoreName = "Objects";
let request = moz_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 = moz_indexedDB.open(name, description);
let request = mozIndexedDB.open(name, description);
is(request.readyState, LOADING, "Correct readyState");
request.onerror = errorHandler;

Просмотреть файл

@ -20,7 +20,7 @@ function testSteps()
const name = window.location.pathname;
const description = "My Test Database";
let request = moz_indexedDB.open(name, description);
let request = mozIndexedDB.open(name, description);
request.onerror = errorHandler;
request.onsuccess = grabEventAndContinueHandler;
let event = yield;

Просмотреть файл

@ -20,7 +20,7 @@ function testSteps()
const name = window.location.pathname;
const description = "My Test Database";
let request = moz_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 = moz_indexedDB.open(name, description);
let request = mozIndexedDB.open(name, description);
request.onerror = errorHandler;
request.onsuccess = grabEventAndContinueHandler;
let event = yield;
@ -34,7 +34,7 @@
db1.close();
}, false);
request = moz_indexedDB.open(name, description);
request = mozIndexedDB.open(name, description);
request.onerror = errorHandler;
request.onsuccess = grabEventAndContinueHandler;
event = yield;
@ -63,7 +63,7 @@
ok(event.result === event.transaction, "Good result");
is(event.transaction.mode, IDBTransaction.VERSION_CHANGE, "Correct mode");
request = moz_indexedDB.open(name, description);
request = mozIndexedDB.open(name, description);
request.onerror = errorHandler;
request.onsuccess = grabEventAndContinueHandler;
event = yield;

Просмотреть файл

@ -13,7 +13,7 @@
<script type="text/javascript;version=1.7">
function testSteps()
{
let request = moz_indexedDB.open(window.location.pathname);
let request = mozIndexedDB.open(window.location.pathname);
request.onerror = errorHandler;
request.onsuccess = grabEventAndContinueHandler;
let event = yield;

Просмотреть файл

@ -25,7 +25,7 @@
const description = "My Test Database";
let request = moz_indexedDB.open(name, description);
let request = mozIndexedDB.open(name, description);
request.onerror = errorHandler;
request.onsuccess = grabEventAndContinueHandler;
let event = yield;

Просмотреть файл

@ -13,7 +13,7 @@
<script type="text/javascript;version=1.7">
function testSteps()
{
let request = moz_indexedDB.open(window.location.pathname);
let request = mozIndexedDB.open(window.location.pathname);
request.onerror = errorHandler;
request.onsuccess = grabEventAndContinueHandler;
let event = yield;

Просмотреть файл

@ -13,7 +13,7 @@
<script type="text/javascript;version=1.7">
function testSteps()
{
let request = moz_indexedDB.open(window.location.pathname);
let request = mozIndexedDB.open(window.location.pathname);
request.onerror = errorHandler;
request.onsuccess = grabEventAndContinueHandler;
let event = yield;

Просмотреть файл

@ -21,7 +21,7 @@
const name = window.location.pathname;
const description = "My Test Database";
let request = moz_indexedDB.open(name, description);
let request = mozIndexedDB.open(name, description);
request.onerror = errorHandler;
request.onsuccess = grabEventAndContinueHandler;
let event = yield;