--- a/dom/indexedDB/test/unit/.eslintrc.js
+++ b/dom/indexedDB/test/unit/.eslintrc.js
@@ -5,13 +5,11 @@ module.exports = {
"plugin:mozilla/recommended",
"plugin:mozilla/xpcshell-test",
],
"plugins": [
"mozilla"
],
"rules": {
"brace-style": "off",
- "no-mixed-spaces-and-tabs": "off",
"no-shadow": "off",
- "no-unused-vars": "off",
}
};
--- a/dom/indexedDB/test/unit/test_add_put.js
+++ b/dom/indexedDB/test/unit/test_add_put.js
@@ -9,17 +9,16 @@ function* testSteps()
{
const name = this.window ? window.location.pathname : "Splendid Test";
let openRequest = indexedDB.open(name, 1);
openRequest.onerror = errorHandler;
openRequest.onupgradeneeded = grabEventAndContinueHandler;
openRequest.onsuccess = unexpectedSuccessHandler;
let event = yield undefined;
let db = event.target.result;
- let trans = event.target.transaction;
for (let autoincrement of [true, false]) {
for (let keypath of [false, true, "missing", "invalid"]) {
for (let method of ["put", "add"]) {
for (let explicit of [true, false, undefined, "invalid"]) {
for (let existing of [true, false]) {
let speccedNoKey = (keypath == false || keypath == "missing") &&
!explicit;
--- a/dom/indexedDB/test/unit/test_cursors.js
+++ b/dom/indexedDB/test/unit/test_cursors.js
@@ -286,17 +286,16 @@ function* testSteps()
request = objectStore.put("foo", sortedKeys[4]);
request.onerror = errorHandler;
request.onsuccess = grabEventAndContinueHandler;
event = yield undefined;
keyIndex = 0;
let gotRemoveEvent = false;
- let retval = false;
request = objectStore.openCursor(null, "next");
request.onerror = errorHandler;
storedCursor = null;
request.onsuccess = function(event) {
let cursor = event.target.result;
if (cursor) {
storedCursor = cursor;
--- a/dom/indexedDB/test/unit/test_database_onclose.js
+++ b/dom/indexedDB/test/unit/test_database_onclose.js
@@ -66,17 +66,17 @@ function* testSteps()
is(event.target, db, "Correct target");
info("Wait for callback of clearAllDatabases().");
yield undefined;
testInvalidStateError(db, txn);
info("#2: Verifying IDBDatabase.onclose && IDBTransaction.onerror " +
- "in *write* operation after cleared by the agent.");
+ "in *write* operation after cleared by the agent.");
openRequest = indexedDB.open(name, 1);
openRequest.onerror = errorHandler;
openRequest.onsuccess = unexpectedSuccessHandler;
openRequest.onupgradeneeded = grabEventAndContinueHandler;
ok(openRequest instanceof IDBOpenDBRequest, "Expect an IDBOpenDBRequest");
event = yield undefined;
--- a/dom/indexedDB/test/unit/test_idle_maintenance.js
+++ b/dom/indexedDB/test/unit/test_idle_maintenance.js
@@ -36,27 +36,23 @@ function* testSteps()
getService(Ci.nsIQuotaManagerService);
// Keep at least one database open.
let req = indexedDB.open("foo-a", 1);
req.onerror = errorHandler;
req.onsuccess = grabEventAndContinueHandler;
let event = yield undefined;
- let dbA = event.target.result;
-
// Keep at least one factory operation alive by deleting a database that is
// stil open.
req = indexedDB.open("foo-b", 1);
req.onerror = errorHandler;
req.onsuccess = grabEventAndContinueHandler;
event = yield undefined;
- let dbB = event.target.result;
-
indexedDB.deleteDatabase("foo-b");
// Create a database which we will later try to open while maintenance is
// performed.
req = indexedDB.open("foo-c", 1);
req.onerror = errorHandler;
req.onsuccess = grabEventAndContinueHandler;
event = yield undefined;
--- a/dom/indexedDB/test/unit/test_index_getAll.js
+++ b/dom/indexedDB/test/unit/test_index_getAll.js
@@ -20,33 +20,16 @@ function* testSteps()
];
const indexData = [
{ name: "name", keyPath: "name", options: { unique: true } },
{ name: "height", keyPath: "height", options: { unique: false } },
{ name: "weight", keyPath: "weight", options: { unique: false } }
];
- const objectStoreDataNameSort = [
- { key: "237-23-7733", value: { name: "Ann", height: 52, weight: 110 } },
- { key: "237-23-7732", value: { name: "Bob", height: 60, weight: 120 } },
- { key: "237-23-7736", value: { name: "Joe", height: 65, weight: 150 } },
- { key: "237-23-7737", value: { name: "Pat", height: 65 } },
- { key: "237-23-7734", value: { name: "Ron", height: 73, weight: 180 } },
- { key: "237-23-7735", value: { name: "Sue", height: 58, weight: 130 } }
- ];
-
- const objectStoreDataWeightSort = [
- { key: "237-23-7733", value: { name: "Ann", height: 52, weight: 110 } },
- { key: "237-23-7732", value: { name: "Bob", height: 60, weight: 120 } },
- { key: "237-23-7735", value: { name: "Sue", height: 58, weight: 130 } },
- { key: "237-23-7736", value: { name: "Joe", height: 65, weight: 150 } },
- { key: "237-23-7734", value: { name: "Ron", height: 73, weight: 180 } }
- ];
-
const objectStoreDataHeightSort = [
{ key: "237-23-7733", value: { name: "Ann", height: 52, weight: 110 } },
{ key: "237-23-7735", value: { name: "Sue", height: 58, weight: 130 } },
{ key: "237-23-7732", value: { name: "Bob", height: 60, weight: 120 } },
{ key: "237-23-7736", value: { name: "Joe", height: 65, weight: 150 } },
{ key: "237-23-7737", value: { name: "Pat", height: 65 } },
{ key: "237-23-7734", value: { name: "Ron", height: 73, weight: 180 } }
];
--- a/dom/indexedDB/test/unit/test_index_getAllObjects.js
+++ b/dom/indexedDB/test/unit/test_index_getAllObjects.js
@@ -20,33 +20,16 @@ function* testSteps()
];
const indexData = [
{ name: "name", keyPath: "name", options: { unique: true } },
{ name: "height", keyPath: "height", options: { unique: false } },
{ name: "weight", keyPath: "weight", options: { unique: false } }
];
- const objectStoreDataNameSort = [
- { key: "237-23-7733", value: { name: "Ann", height: 52, weight: 110 } },
- { key: "237-23-7732", value: { name: "Bob", height: 60, weight: 120 } },
- { key: "237-23-7736", value: { name: "Joe", height: 65, weight: 150 } },
- { key: "237-23-7737", value: { name: "Pat", height: 65 } },
- { key: "237-23-7734", value: { name: "Ron", height: 73, weight: 180 } },
- { key: "237-23-7735", value: { name: "Sue", height: 58, weight: 130 } }
- ];
-
- const objectStoreDataWeightSort = [
- { key: "237-23-7733", value: { name: "Ann", height: 52, weight: 110 } },
- { key: "237-23-7732", value: { name: "Bob", height: 60, weight: 120 } },
- { key: "237-23-7735", value: { name: "Sue", height: 58, weight: 130 } },
- { key: "237-23-7736", value: { name: "Joe", height: 65, weight: 150 } },
- { key: "237-23-7734", value: { name: "Ron", height: 73, weight: 180 } }
- ];
-
const objectStoreDataHeightSort = [
{ key: "237-23-7733", value: { name: "Ann", height: 52, weight: 110 } },
{ key: "237-23-7735", value: { name: "Sue", height: 58, weight: 130 } },
{ key: "237-23-7732", value: { name: "Bob", height: 60, weight: 120 } },
{ key: "237-23-7736", value: { name: "Joe", height: 65, weight: 150 } },
{ key: "237-23-7737", value: { name: "Pat", height: 65 } },
{ key: "237-23-7734", value: { name: "Ron", height: 73, weight: 180 } }
];
--- a/dom/indexedDB/test/unit/test_index_object_cursors.js
+++ b/dom/indexedDB/test/unit/test_index_object_cursors.js
@@ -35,19 +35,19 @@ function* testSteps()
event.target.onsuccess = continueToNextStep;
for (let objectStoreIndex in objectStoreData) {
const objectStoreInfo = objectStoreData[objectStoreIndex];
let objectStore = db.createObjectStore(objectStoreInfo.name,
objectStoreInfo.options);
for (let indexIndex in indexData) {
const indexInfo = indexData[indexIndex];
- let index = objectStore.createIndex(indexInfo.name,
- indexInfo.keyPath,
- indexInfo.options);
+ objectStore.createIndex(indexInfo.name,
+ indexInfo.keyPath,
+ indexInfo.options);
}
}
yield undefined;
ok(true, "Initial setup");
for (let objectStoreIndex in objectStoreData) {
const info = objectStoreData[objectStoreIndex];
--- a/dom/indexedDB/test/unit/test_keys.js
+++ b/dom/indexedDB/test/unit/test_keys.js
@@ -3,27 +3,23 @@
* http://creativecommons.org/publicdomain/zero/1.0/
*/
var testGenerator = testSteps();
function* testSteps()
{
const dbname = this.window ? window.location.pathname : "Splendid Test";
- const RW = "readwrite"
- let c1 = 1;
- let c2 = 1;
let openRequest = indexedDB.open(dbname, 1);
openRequest.onerror = errorHandler;
openRequest.onupgradeneeded = grabEventAndContinueHandler;
openRequest.onsuccess = unexpectedSuccessHandler;
let event = yield undefined;
let db = event.target.result;
- let trans = event.target.transaction;
// Create test stores
let store = db.createObjectStore("store");
// Test simple inserts
var keys = [
-1 / 0,
-1.7e308,
--- a/dom/indexedDB/test/unit/test_locale_aware_index_getAll.js
+++ b/dom/indexedDB/test/unit/test_locale_aware_index_getAll.js
@@ -20,33 +20,16 @@ function* testSteps()
];
const indexData = [
{ name: "name", keyPath: "name", options: { unique: true, locale: true } },
{ name: "height", keyPath: "height", options: { unique: false, locale: true } },
{ name: "weight", keyPath: "weight", options: { unique: false, locale: true } }
];
- const objectStoreDataNameSort = [
- { key: "237-23-7733", value: { name: "ana", height: 52, weight: 110 } },
- { key: "237-23-7732", value: { name: "\u00E1na", height: 60, weight: 120 } },
- { key: "237-23-7736", value: { name: "bob", height: 65, weight: 150 } },
- { key: "237-23-7737", value: { name: "\u00E9ason", height: 65 } },
- { key: "237-23-7734", value: { name: "fabio", height: 73, weight: 180 } },
- { key: "237-23-7735", value: { name: "\u00F3scar", height: 58, weight: 130 } }
- ];
-
- const objectStoreDataWeightSort = [
- { key: "237-23-7733", value: { name: "ana", height: 52, weight: 110 } },
- { key: "237-23-7732", value: { name: "\u00E1na", height: 60, weight: 120 } },
- { key: "237-23-7735", value: { name: "\u00F3scar", height: 58, weight: 130 } },
- { key: "237-23-7736", value: { name: "bob", height: 65, weight: 150 } },
- { key: "237-23-7734", value: { name: "fabio", height: 73, weight: 180 } }
- ];
-
const objectStoreDataHeightSort = [
{ key: "237-23-7733", value: { name: "ana", height: 52, weight: 110 } },
{ key: "237-23-7735", value: { name: "\u00F3scar", height: 58, weight: 130 } },
{ key: "237-23-7732", value: { name: "\u00E1na", height: 60, weight: 120 } },
{ key: "237-23-7736", value: { name: "bob", height: 65, weight: 150 } },
{ key: "237-23-7737", value: { name: "\u00E9ason", height: 65 } },
{ key: "237-23-7734", value: { name: "fabio", height: 73, weight: 180 } }
];
--- a/dom/indexedDB/test/unit/test_locale_aware_index_getAllObjects.js
+++ b/dom/indexedDB/test/unit/test_locale_aware_index_getAllObjects.js
@@ -20,33 +20,16 @@ function* testSteps()
];
const indexData = [
{ name: "name", keyPath: "name", options: { unique: true, locale: true } },
{ name: "height", keyPath: "height", options: { unique: false, locale: true } },
{ name: "weight", keyPath: "weight", options: { unique: false, locale: true } }
];
- const objectStoreDataNameSort = [
- { key: "237-23-7733", value: { name: "ana", height: 52, weight: 110 } },
- { key: "237-23-7732", value: { name: "\u00E1na", height: 60, weight: 120 } },
- { key: "237-23-7736", value: { name: "bob", height: 65, weight: 150 } },
- { key: "237-23-7737", value: { name: "\u00E9ason", height: 65 } },
- { key: "237-23-7734", value: { name: "fabio", height: 73, weight: 180 } },
- { key: "237-23-7735", value: { name: "\u00F3scar", height: 58, weight: 130 } }
- ];
-
- const objectStoreDataWeightSort = [
- { key: "237-23-7733", value: { name: "ana", height: 52, weight: 110 } },
- { key: "237-23-7732", value: { name: "\u00E1na", height: 60, weight: 120 } },
- { key: "237-23-7735", value: { name: "\u00F3scar", height: 58, weight: 130 } },
- { key: "237-23-7736", value: { name: "bob", height: 65, weight: 150 } },
- { key: "237-23-7734", value: { name: "fabio", height: 73, weight: 180 } }
- ];
-
const objectStoreDataHeightSort = [
{ key: "237-23-7733", value: { name: "ana", height: 52, weight: 110 } },
{ key: "237-23-7735", value: { name: "\u00F3scar", height: 58, weight: 130 } },
{ key: "237-23-7732", value: { name: "\u00E1na", height: 60, weight: 120 } },
{ key: "237-23-7736", value: { name: "bob", height: 65, weight: 150 } },
{ key: "237-23-7737", value: { name: "\u00E9ason", height: 65 } },
{ key: "237-23-7734", value: { name: "fabio", height: 73, weight: 180 } }
];
--- a/dom/indexedDB/test/unit/test_lowDiskSpace.js
+++ b/dom/indexedDB/test/unit/test_lowDiskSpace.js
@@ -174,17 +174,17 @@ function* testSteps()
let db = event.target.result;
db.onerror = errorHandler;
let txn = event.target.transaction;
txn.onerror = expectedErrorHandler("AbortError");
txn.onabort = grabEventAndContinueHandler;
- let objectStore = db.createObjectStore(objectStoreName, objectStoreOptions);
+ db.createObjectStore(objectStoreName, objectStoreOptions);
request.onupgradeneeded = unexpectedSuccessHandler;
event = yield undefined;
is(event.type, "abort", "Got correct event type");
is(event.target.error.name, "QuotaExceededError", "Got correct error type");
request.onerror = expectedErrorHandler("AbortError");
@@ -231,17 +231,17 @@ function* testSteps()
db = event.target.result;
db.onerror = errorHandler;
let txn = event.target.transaction;
txn.onerror = expectedErrorHandler("AbortError");
txn.onabort = grabEventAndContinueHandler;
objectStore = event.target.transaction.objectStore(objectStoreName);
- let index = objectStore.createIndex(indexName, indexName, indexOptions);
+ objectStore.createIndex(indexName, indexName, indexOptions);
request.onupgradeneeded = unexpectedSuccessHandler;
event = yield undefined;
is(event.type, "abort", "Got correct event type");
is(event.target.error.name, "QuotaExceededError", "Got correct error type");
request.onerror = expectedErrorHandler("AbortError");
@@ -261,17 +261,17 @@ function* testSteps()
let event = yield undefined;
is(event.type, "upgradeneeded", "Upgrading database");
let db = event.target.result;
db.onerror = errorHandler;
let objectStore = event.target.transaction.objectStore(objectStoreName);
- let index = objectStore.createIndex(indexName, indexName, indexOptions);
+ objectStore.createIndex(indexName, indexName, indexOptions);
request.onupgradeneeded = unexpectedSuccessHandler;
request.onsuccess = grabEventAndContinueHandler;
event = yield undefined;
is(event.type, "success", "Upgraded database");
ok(event.target.result === db, "Got the same database");
@@ -348,17 +348,17 @@ function* testSteps()
let event = yield undefined;
is(event.type, "upgradeneeded", "Upgrading database");
let db = event.target.result;
db.onerror = errorHandler;
let objectStore = db.createObjectStore(objectStoreName, objectStoreOptions);
- let index = objectStore.createIndex(indexName, indexName, indexOptions);
+ objectStore.createIndex(indexName, indexName, indexOptions);
for (let data of dbData) {
objectStore.add(data);
}
request.onupgradeneeded = unexpectedSuccessHandler;
request.onsuccess = grabEventAndContinueHandler;
event = yield undefined;
--- a/dom/indexedDB/test/unit/test_maximal_serialized_object_size.js
+++ b/dom/indexedDB/test/unit/test_maximal_serialized_object_size.js
@@ -35,17 +35,16 @@ function* testSteps()
let openRequest = indexedDB.open(name, 1);
openRequest.onerror = errorHandler;
openRequest.onupgradeneeded = grabEventAndContinueHandler;
openRequest.onsuccess = unexpectedSuccessHandler;
let event = yield undefined;
let db = event.target.result;
- let txn = event.target.transaction;
is(db.objectStoreNames.length, 0, "Correct objectStoreNames list");
let objectStore = db.createObjectStore("test store", { keyPath: "id" });
is(db.objectStoreNames.length, 1, "Correct objectStoreNames list");
is(db.objectStoreNames.item(0), objectStore.name, "Correct object store name");
function testTooLargeError(aOperation, aObject) {
--- a/dom/indexedDB/test/unit/test_multientry.js
+++ b/dom/indexedDB/test/unit/test_multientry.js
@@ -74,39 +74,39 @@ function* testSteps()
}
else if (test.delete) {
req = store.delete(test.delete);
}
else {
ok(false, "borked test");
}
req.onsuccess = grabEventAndContinueHandler;
- let e = yield undefined;
+ yield undefined;
req = index.openKeyCursor();
req.onsuccess = grabEventAndContinueHandler;
for (let j = 0; j < test.indexes.length; ++j) {
- e = yield undefined;
+ yield undefined;
is(req.result.key, test.indexes[j].v, "found expected index key at index " + j + testName);
is(req.result.primaryKey, test.indexes[j].k, "found expected index primary key at index " + j + testName);
req.result.continue();
}
- e = yield undefined;
+ yield undefined;
ok(req.result == null, "exhausted indexes");
let tempIndex = store.createIndex("temp index", "x", { multiEntry: true });
req = tempIndex.openKeyCursor();
req.onsuccess = grabEventAndContinueHandler;
for (let j = 0; j < test.indexes.length; ++j) {
- e = yield undefined;
+ yield undefined;
is(req.result.key, test.indexes[j].v, "found expected temp index key at index " + j + testName);
is(req.result.primaryKey, test.indexes[j].k, "found expected temp index primary key at index " + j + testName);
req.result.continue();
}
- e = yield undefined;
+ yield undefined;
ok(req.result == null, "exhausted temp index");
store.deleteIndex("temp index");
}
// Unique indexes
tests =
[{ add: { x: 1, id: 1 },
indexes: [{ v: 1, k: 1 }] },
@@ -158,51 +158,50 @@ function* testSteps()
req = store.delete(test.delete);
}
else {
ok(false, "borked test");
}
if (!test.fail) {
req.onsuccess = grabEventAndContinueHandler;
- let e = yield undefined;
+ yield undefined;
indexes = test.indexes;
}
else {
req.onsuccess = unexpectedSuccessHandler;
req.onerror = grabEventAndContinueHandler;
ok(true, "waiting for error");
let e = yield undefined;
ok(true, "got error: " + e.type);
e.preventDefault();
e.stopPropagation();
}
- let e;
req = index.openKeyCursor();
req.onsuccess = grabEventAndContinueHandler;
for (let j = 0; j < indexes.length; ++j) {
- e = yield undefined;
+ yield undefined;
is(req.result.key, indexes[j].v, "found expected index key at index " + j + testName);
is(req.result.primaryKey, indexes[j].k, "found expected index primary key at index " + j + testName);
req.result.continue();
}
- e = yield undefined;
+ yield undefined;
ok(req.result == null, "exhausted indexes");
let tempIndex = store.createIndex("temp index", "x", { multiEntry: true, unique: true });
req = tempIndex.openKeyCursor();
req.onsuccess = grabEventAndContinueHandler;
for (let j = 0; j < indexes.length; ++j) {
- e = yield undefined;
+ yield undefined;
is(req.result.key, indexes[j].v, "found expected temp index key at index " + j + testName);
is(req.result.primaryKey, indexes[j].k, "found expected temp index primary key at index " + j + testName);
req.result.continue();
}
- e = yield undefined;
+ yield undefined;
ok(req.result == null, "exhausted temp index");
store.deleteIndex("temp index");
}
openRequest.onsuccess = grabEventAndContinueHandler;
yield undefined;
--- a/dom/indexedDB/test/unit/test_names_sorted.js
+++ b/dom/indexedDB/test/unit/test_names_sorted.js
@@ -26,24 +26,22 @@ function* testSteps()
for (let i = 0; i < objectStoreInfo.length; i++) {
let info = objectStoreInfo[i];
let objectStore = info.hasOwnProperty("options") ?
db.createObjectStore(info.name, info.options) :
db.createObjectStore(info.name);
// Test index creation, and that it ends up in indexNames.
- let objectStoreName = info.name;
for (let j = 0; j < indexInfo.length; j++) {
let info = indexInfo[j];
- let count = objectStore.indexNames.length;
- let index = info.hasOwnProperty("options") ?
- objectStore.createIndex(info.name, info.keyPath,
- info.options) :
- objectStore.createIndex(info.name, info.keyPath);
+ info.hasOwnProperty("options") ?
+ objectStore.createIndex(info.name, info.keyPath,
+ info.options) :
+ objectStore.createIndex(info.name, info.keyPath);
}
}
request.onsuccess = grabEventAndContinueHandler;
request.onupgradeneeded = unexpectedSuccessHandler;
event = yield undefined;
--- a/dom/indexedDB/test/unit/test_odd_result_order.js
+++ b/dom/indexedDB/test/unit/test_odd_result_order.js
@@ -17,17 +17,17 @@ function* testSteps()
let db = event.target.result;
ok(db instanceof IDBDatabase, "Got a real database");
db.onerror = errorHandler;
let objectStore = db.createObjectStore("foo", { keyPath: "key",
autoIncrement: true });
- let index = objectStore.createIndex("foo", "index");
+ objectStore.createIndex("foo", "index");
event.target.onsuccess = continueToNextStep;
yield undefined;
objectStore = db.transaction("foo", "readwrite")
.objectStore("foo");
request = objectStore.add(data);
request.onsuccess = grabEventAndContinueHandler;
--- a/dom/indexedDB/test/unit/test_readwriteflush_disabled.js
+++ b/dom/indexedDB/test/unit/test_readwriteflush_disabled.js
@@ -50,17 +50,17 @@ function* testSteps()
// success
let db = request.result;
info("Attempting to create a 'readwriteflush' transaction");
let exception;
try {
- let transaction = db.transaction(name, "readwriteflush");
+ db.transaction(name, "readwriteflush");
} catch (e) {
exception = e;
}
ok(exception, "'readwriteflush' transaction threw");
ok(exception instanceof Error, "exception is an Error object");
is(exception.message,
"Argument 2 of IDBDatabase.transaction 'readwriteflush' is not a valid " +
--- a/dom/indexedDB/test/unit/test_setVersion_abort.js
+++ b/dom/indexedDB/test/unit/test_setVersion_abort.js
@@ -13,17 +13,17 @@ function* testSteps()
request.onerror = errorHandler;
request.onsuccess = unexpectedSuccessHandler;
request.onupgradeneeded = grabEventAndContinueHandler;
let event = yield undefined;
let db = event.target.result;
let objectStore = db.createObjectStore("foo");
- let index = objectStore.createIndex("bar", "baz");
+ objectStore.createIndex("bar", "baz");
is(db.version, 1, "Correct version");
is(db.objectStoreNames.length, 1, "Correct objectStoreNames length");
is(objectStore.indexNames.length, 1, "Correct indexNames length");
let transaction = event.target.transaction;
is(transaction.mode, "versionchange", "Correct transaction mode");
transaction.oncomplete = unexpectedSuccessHandler;
@@ -72,17 +72,17 @@ function* testSteps()
let db2 = event.target.result;
isnot(db, db2, "Should give a different db instance");
is(db2.version, 1, "Correct version");
is(db2.objectStoreNames.length, 0, "Correct objectStoreNames length");
let objectStore2 = db2.createObjectStore("foo");
- let index2 = objectStore2.createIndex("bar", "baz");
+ objectStore2.createIndex("bar", "baz");
request.onsuccess = grabEventAndContinueHandler;
request.onupgradeneeded = unexpectedSuccessHandler;
event = yield undefined;
is(event.target.result, db2, "Correct target");
is(event.type, "success", "Got success event");
is(db2.version, 1, "Correct version");
--- a/dom/indexedDB/test/unit/test_transaction_lifetimes.js
+++ b/dom/indexedDB/test/unit/test_transaction_lifetimes.js
@@ -15,17 +15,17 @@ function* testSteps()
let db = event.target.result;
db.onerror = errorHandler;
event.target.transaction.onerror = errorHandler;
event.target.transaction.oncomplete = grabEventAndContinueHandler;
let os = db.createObjectStore("foo", { autoIncrement: true });
- let index = os.createIndex("bar", "foo.bar");
+ os.createIndex("bar", "foo.bar");
event = yield undefined;
is(request.transaction, event.target,
"request.transaction should still be set");
request.onsuccess = grabEventAndContinueHandler;
event = yield undefined;
--- a/dom/indexedDB/test/unit/test_transaction_lifetimes_nested.js
+++ b/dom/indexedDB/test/unit/test_transaction_lifetimes_nested.js
@@ -16,17 +16,17 @@ function* testSteps()
let db = event.target.result;
db.onerror = errorHandler;
event.target.onsuccess = continueToNextStep;
db.createObjectStore("foo");
yield undefined;
- let transaction1 = db.transaction("foo");
+ db.transaction("foo");
let transaction2;
let comp = this.window ? SpecialPowers.wrap(Components) : Components;
let thread = comp.classes["@mozilla.org/thread-manager;1"]
.getService(comp.interfaces.nsIThreadManager)
.currentThread;