From 40a355a42d4a9444dc753c04c6608dade2f06a23 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:13:27 +0200 Subject: Adding upstream version 125.0.1. Signed-off-by: Daniel Baumann --- dom/indexedDB/test/unit/test_blocked_order.js | 8 +- .../test/unit/test_cleanup_transaction.js | 4 +- dom/indexedDB/test/unit/test_clear.js | 2 +- .../test/unit/test_connection_idle_maintenance.js | 97 ++++++++++ .../unit/test_connection_idle_maintenance_stop.js | 204 +++++++++++++++++++++ dom/indexedDB/test/unit/test_cursor_cycle.js | 2 +- dom/indexedDB/test/unit/test_cursor_mutation.js | 4 +- dom/indexedDB/test/unit/test_cursors.js | 4 +- dom/indexedDB/test/unit/test_database_onclose.js | 4 +- dom/indexedDB/test/unit/test_getAll.js | 2 +- .../test/unit/test_index_object_cursors.js | 4 +- .../test/unit/test_index_update_delete.js | 4 +- dom/indexedDB/test/unit/test_indexes_bad_values.js | 2 +- dom/indexedDB/test/unit/test_invalid_version.js | 1 + .../test/unit/test_quotaExceeded_recovery.js | 4 +- dom/indexedDB/test/unit/test_remove_objectStore.js | 2 +- dom/indexedDB/test/unit/test_setVersion_throw.js | 4 +- dom/indexedDB/test/unit/test_table_locks.js | 4 +- dom/indexedDB/test/unit/test_transaction_abort.js | 17 +- .../test/unit/test_transaction_abort_hang.js | 4 +- .../test/unit/xpcshell-head-parent-process.js | 14 +- .../test/unit/xpcshell-parent-process.toml | 4 + 22 files changed, 350 insertions(+), 45 deletions(-) create mode 100644 dom/indexedDB/test/unit/test_connection_idle_maintenance.js create mode 100644 dom/indexedDB/test/unit/test_connection_idle_maintenance_stop.js (limited to 'dom/indexedDB/test/unit') diff --git a/dom/indexedDB/test/unit/test_blocked_order.js b/dom/indexedDB/test/unit/test_blocked_order.js index 212b1b3254..0301c12df2 100644 --- a/dom/indexedDB/test/unit/test_blocked_order.js +++ b/dom/indexedDB/test/unit/test_blocked_order.js @@ -33,7 +33,7 @@ function* testSteps() { let db = request.result; is(db.version, 1, "Got version 1"); - db.onversionchange = function (event) { + db.onversionchange = function () { info("Closing database " + thisIndex); db.close(); @@ -51,7 +51,7 @@ function* testSteps() { request.onerror = errorHandler; request.onsuccess = grabEventAndContinueHandler; - request.onblocked = function (event) { + request.onblocked = function () { ok(false, "Should not receive a blocked event"); }; @@ -95,7 +95,7 @@ function* testSteps() { let db = request.result; is(db.version, 1, "Got version 1"); - db.onversionchange = function (event) { + db.onversionchange = function () { if (thisIndex == databaseCount - 1) { info("Closing all databases with version 1"); @@ -121,7 +121,7 @@ function* testSteps() { request.onerror = errorHandler; request.onsuccess = grabEventAndContinueHandler; - request.onblocked = function (event) { + request.onblocked = function () { ok(false, "Should not receive a blocked event"); }; diff --git a/dom/indexedDB/test/unit/test_cleanup_transaction.js b/dom/indexedDB/test/unit/test_cleanup_transaction.js index cac3c9bf60..25af4c5729 100644 --- a/dom/indexedDB/test/unit/test_cleanup_transaction.js +++ b/dom/indexedDB/test/unit/test_cleanup_transaction.js @@ -74,12 +74,12 @@ function* testSteps() { event.stopPropagation(); }; - trans.oncomplete = function (event) { + trans.oncomplete = function () { i++; j++; testGenerator.next(true); }; - trans.onabort = function (event) { + trans.onabort = function () { is(trans.error.name, "QuotaExceededError", "Reached quota limit"); testGenerator.next(false); }; diff --git a/dom/indexedDB/test/unit/test_clear.js b/dom/indexedDB/test/unit/test_clear.js index d504ff8851..87eef2c0ab 100644 --- a/dom/indexedDB/test/unit/test_clear.js +++ b/dom/indexedDB/test/unit/test_clear.js @@ -70,7 +70,7 @@ function* testSteps() { request = db.transaction("foo").objectStore("foo").openCursor(); request.onerror = errorHandler; - request.onsuccess = function (event) { + request.onsuccess = function () { let cursor = request.result; if (cursor) { ok(false, "Shouldn't have any entries"); diff --git a/dom/indexedDB/test/unit/test_connection_idle_maintenance.js b/dom/indexedDB/test/unit/test_connection_idle_maintenance.js new file mode 100644 index 0000000000..288f656c65 --- /dev/null +++ b/dom/indexedDB/test/unit/test_connection_idle_maintenance.js @@ -0,0 +1,97 @@ +/** + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/publicdomain/zero/1.0/ + */ + +/* exported testSteps */ +async function testSteps() { + // A constant used to deal with small decrease in usage when transactions are + // transferred from the WAL file back into the original database, also called + // as checkpointing. + const cosmologicalConstant = 31768; + + // The length of time that database connections will be held open after all + // transactions have completed before doing idle maintenance. + const connectionIdleMaintenanceMS = 2 * 1000; + + const name = "test_connection_idle_maintenance"; + const abc = "abcdefghijklmnopqrstuvwxyz"; + + // IndexedDB on Android does `PRAGMA auto_vacuum = FULL`, so the freelist + // pages are moved to the end of the database file and the database file is + // truncated to remove the freelist pages at every transaction commit. + if (mozinfo.os == "android") { + info("Test disabled on Android for now"); + return; + } + + info("Creating database"); + + let request = indexedDB.open(name, 1); + + let event = await expectingUpgrade(request); + + let database = event.target.result; + + let objectStore = database.createObjectStore(name); + + // Add lots of data... + for (let i = 0; i < 10000; i++) { + objectStore.add(abc, i); + } + + // And then clear it so that maintenance has some space to reclaim. + objectStore.clear(); + + await expectingSuccess(request); + + info("Getting database usage before maintenance"); + + let databaseUsageBeforeMaintenance = await new Promise(function (resolve) { + getCurrentUsage(function (request) { + resolve(request.result.databaseUsage); + }); + }); + + info("Waiting for maintenance to start"); + + // This time is a double of connectionIdleMaintenanceMS which should be + // pessimistic enough to work with randomly slowed down threads in the chaos + // mode. + await new Promise(function (resolve) { + do_timeout(2 * connectionIdleMaintenanceMS, resolve); + }); + + info("Waiting for maintenance to finish"); + + // This time is a double of connectionIdleMaintenanceMS which should be + // pessimistic enough to work with randomly slowed down threads in the chaos + // mode. + await new Promise(function (resolve) { + do_timeout(2 * connectionIdleMaintenanceMS, resolve); + }); + + info("Getting database usage after maintenance"); + + let databaseUsageAfterMaintenance = await new Promise(function (resolve) { + getCurrentUsage(function (request) { + resolve(request.result.databaseUsage); + }); + }); + + info( + "Database usage before: " + + databaseUsageBeforeMaintenance + + ". " + + "Database usage after: " + + databaseUsageAfterMaintenance + ); + + // Checkpointing done immediately after the maintenance can slightly decrease + // the usage even when the maintenance was not run at all. + ok( + databaseUsageBeforeMaintenance - databaseUsageAfterMaintenance >= + cosmologicalConstant, + "Maintenance significantly decreased database usage" + ); +} diff --git a/dom/indexedDB/test/unit/test_connection_idle_maintenance_stop.js b/dom/indexedDB/test/unit/test_connection_idle_maintenance_stop.js new file mode 100644 index 0000000000..33dc69b210 --- /dev/null +++ b/dom/indexedDB/test/unit/test_connection_idle_maintenance_stop.js @@ -0,0 +1,204 @@ +/** + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/publicdomain/zero/1.0/ + */ + +/* exported testSteps */ +async function testSteps() { + // A constant used to deal with small decrease in usage when transactions are + // transferred from the WAL file back into the original database, also called + // as checkpointing. + const cosmologicalConstant = 32768; + + // The maximum number of threads that can be used for database activity at a + // single time. + const maxConnectionThreadCount = 20; + + // The length of time that database connections will be held open after all + // transactions have completed before doing idle maintenance. + const connectionIdleMaintenanceMS = 2 * 1000; + + const name = "test_connection_idle_maintenance_stop"; + const abc = "abcdefghijklmnopqrstuvwxyz"; + + // IndexedDB on Android does `PRAGMA auto_vacuum = FULL`, so the freelist + // pages are moved to the end of the database file and the database file is + // truncated to remove the freelist pages at every transaction commit. + if (mozinfo.os == "android") { + info("Test disabled on Android for now"); + return; + } + + info("Setting pref"); + + Services.prefs.setIntPref( + "dom.indexedDB.connectionIdleMaintenance.pauseOnConnectionThreadMs", + 2 * connectionIdleMaintenanceMS + ); + + info("Forcing only one connection thread to be available"); + + let done = false; + + // Create databases which will continuously keep their connection threads + // busy. + const completePromises = await (async function () { + let promises = []; + + for (let index = 0; index < maxConnectionThreadCount - 1; index++) { + const request = indexedDB.open(name + "-" + index, 1); + + { + const event = await expectingUpgrade(request); + + const database = event.target.result; + + const objectStore = database.createObjectStore(name); + + objectStore.add("foo", 42); + } + + const event = await expectingSuccess(request); + + const database = event.target.result; + + const transaction = database.transaction(name); + + const objectStore = transaction.objectStore(name); + + function doWork() { + const request = objectStore.get(42); + request.onsuccess = function () { + if (!done) { + doWork(); + } + }; + } + + doWork(); + + const promise = new Promise(function (resolve) { + transaction.oncomplete = resolve; + }); + + promises.push(promise); + } + + return promises; + })(); + + info("Creating database A"); + + // Create a database which will be used for stopping of the connection idle + // maintenance. + const databaseA = await (async function () { + const request = indexedDB.open(name + "-a", 1); + + { + const event = await expectingUpgrade(request); + + const database = event.target.result; + + database.createObjectStore(name); + } + + const event = await expectingSuccess(request); + + const database = event.target.result; + + return database; + })(); + + info("Creating database B"); + + // Create a database for checking of the connection idle maintenance. + { + const request = indexedDB.open(name + "-b", 1); + + const event = await expectingUpgrade(request); + + const database = event.target.result; + + const objectStore = database.createObjectStore(name); + + // Add lots of data... + for (let index = 0; index < 10000; index++) { + objectStore.add(abc, index); + } + + // And then clear it so that maintenance has some space to reclaim. + objectStore.clear(); + + await expectingSuccess(request); + } + + info("Getting database usage before maintenance"); + + const databaseUsageBeforeMaintenance = await new Promise(function (resolve) { + getCurrentUsage(function (request) { + resolve(request.result.databaseUsage); + }); + }); + + info("Waiting for maintenance to start"); + + // This time is a double of connectionIdleMaintenanceMS which should be + // pessimistic enough to work with randomly slowed down threads in the + // chaos mode. + await new Promise(function (resolve) { + do_timeout(2 * connectionIdleMaintenanceMS, resolve); + }); + + info("Activating database A"); + + // Activate an open database which should trigger stopping of the connection + // idle maintenance of the database which had a lot of data. + { + const transaction = databaseA.transaction(name); + + const objectStore = transaction.objectStore(name); + + const request = objectStore.get(42); + + await requestSucceeded(request); + } + + info("Waiting for maintenance to finish"); + + // This time is a double of connectionIdleMaintenanceMS which should be + // pessimistic enough to work with randomly slowed down threads in the + // chaos mode. + await new Promise(function (resolve) { + do_timeout(2 * connectionIdleMaintenanceMS, resolve); + }); + + info("Getting database usage after maintenance"); + + const databaseUsageAfterMaintenance = await new Promise(function (resolve) { + getCurrentUsage(function (request) { + resolve(request.result.databaseUsage); + }); + }); + + info( + "Database usage before: " + + databaseUsageBeforeMaintenance + + ". " + + "Database usage after: " + + databaseUsageAfterMaintenance + ); + + // Checkpointing done immediately after the maintenance can slightly decrease + // the usage even when the maintenance was stopped very early. + ok( + databaseUsageBeforeMaintenance - databaseUsageAfterMaintenance < + cosmologicalConstant, + "Maintenance did not significantly decrease database usage" + ); + + done = true; + + info("Waiting for transactions to complete"); + + await Promise.all(completePromises); +} diff --git a/dom/indexedDB/test/unit/test_cursor_cycle.js b/dom/indexedDB/test/unit/test_cursor_cycle.js index 09099387f3..3c60c24238 100644 --- a/dom/indexedDB/test/unit/test_cursor_cycle.js +++ b/dom/indexedDB/test/unit/test_cursor_cycle.js @@ -34,7 +34,7 @@ function* testSteps() { let cursor = event.target.result; if (cursor) { let objectStore = event.target.transaction.objectStore("foo"); - objectStore.delete(Bob.ss).onsuccess = function (event) { + objectStore.delete(Bob.ss).onsuccess = function () { cursor.continue(); }; } diff --git a/dom/indexedDB/test/unit/test_cursor_mutation.js b/dom/indexedDB/test/unit/test_cursor_mutation.js index 6af7df5c9b..c948b8d6c9 100644 --- a/dom/indexedDB/test/unit/test_cursor_mutation.js +++ b/dom/indexedDB/test/unit/test_cursor_mutation.js @@ -101,10 +101,10 @@ function* testSteps() { if (count == 1) { let objectStore = event.target.transaction.objectStore("foo"); - objectStore.delete(objectStoreData[0].ss).onsuccess = function (event) { + objectStore.delete(objectStoreData[0].ss).onsuccess = function () { objectStore.add( objectStoreData[objectStoreData.length - 1] - ).onsuccess = function (event) { + ).onsuccess = function () { cursor.continue(); }; }; diff --git a/dom/indexedDB/test/unit/test_cursors.js b/dom/indexedDB/test/unit/test_cursors.js index 15e3d94355..84d0f082a8 100644 --- a/dom/indexedDB/test/unit/test_cursors.js +++ b/dom/indexedDB/test/unit/test_cursors.js @@ -77,7 +77,7 @@ function* testSteps() { for (let i in keys) { request = objectStore.add("foo", keys[i]); request.onerror = errorHandler; - request.onsuccess = function (event) { + request.onsuccess = function () { if (++keyIndex == keys.length) { testGenerator.next(); } @@ -233,7 +233,7 @@ function* testSteps() { if (keyIndex == 4) { request = cursor.update("bar"); request.onerror = errorHandler; - request.onsuccess = function (event) { + request.onsuccess = function () { keyIndex++; cursor.continue(); }; diff --git a/dom/indexedDB/test/unit/test_database_onclose.js b/dom/indexedDB/test/unit/test_database_onclose.js index 0162ffc3ab..8d24ad620b 100644 --- a/dom/indexedDB/test/unit/test_database_onclose.js +++ b/dom/indexedDB/test/unit/test_database_onclose.js @@ -104,7 +104,7 @@ function* testSteps() { let objectId = 0; while (true) { let addRequest = objectStore.add({ foo: "foo" }, objectId); - addRequest.onerror = function (event) { + addRequest.onerror = function () { info("addRequest.onerror, objectId: " + objectId); txn.onerror = grabEventAndContinueHandler; testGenerator.next(true); @@ -200,7 +200,7 @@ function* testSteps() { let numberOfReadObjects = 0; let readRequest = objectStore.openCursor(); - readRequest.onerror = function (event) { + readRequest.onerror = function () { info("readRequest.onerror, numberOfReadObjects: " + numberOfReadObjects); testGenerator.next(true); }; diff --git a/dom/indexedDB/test/unit/test_getAll.js b/dom/indexedDB/test/unit/test_getAll.js index 6ada30d845..b8c3e6854a 100644 --- a/dom/indexedDB/test/unit/test_getAll.js +++ b/dom/indexedDB/test/unit/test_getAll.js @@ -33,7 +33,7 @@ function* testSteps() { for (let i in values) { request = objectStore.add(values[i]); request.onerror = errorHandler; - request.onsuccess = function (event) { + request.onsuccess = function () { if (++addedCount == values.length) { executeSoon(function () { testGenerator.next(); diff --git a/dom/indexedDB/test/unit/test_index_object_cursors.js b/dom/indexedDB/test/unit/test_index_object_cursors.js index 850e1c6007..992fe9e0e3 100644 --- a/dom/indexedDB/test/unit/test_index_object_cursors.js +++ b/dom/indexedDB/test/unit/test_index_object_cursors.js @@ -102,7 +102,7 @@ function* testSteps() { let obj = cursor.value; obj.updated = true; - cursor.update(obj).onsuccess = function (event) { + cursor.update(obj).onsuccess = function () { ok(true, "Object updated"); cursor.continue(); keyIndex++; @@ -110,7 +110,7 @@ function* testSteps() { return; } - cursor.delete().onsuccess = function (event) { + cursor.delete().onsuccess = function () { ok(true, "Object deleted"); cursor.continue(); keyIndex++; diff --git a/dom/indexedDB/test/unit/test_index_update_delete.js b/dom/indexedDB/test/unit/test_index_update_delete.js index da43feb3b9..df6d3d86f4 100644 --- a/dom/indexedDB/test/unit/test_index_update_delete.js +++ b/dom/indexedDB/test/unit/test_index_update_delete.js @@ -73,7 +73,7 @@ function* testSteps() { is(cursor.key, modifiedEntry, "Correct key"); cursor.value.index = unique ? 30 : 35; - cursor.update(cursor.value).onsuccess = function (event) { + cursor.update(cursor.value).onsuccess = function () { cursor.continue(); }; } else { @@ -106,7 +106,7 @@ function* testSteps() { is(cursor.key, modifiedEntry, "Correct key"); delete cursor.value.index; - cursor.update(cursor.value).onsuccess = function (event) { + cursor.update(cursor.value).onsuccess = function () { indexCount--; cursor.continue(); }; diff --git a/dom/indexedDB/test/unit/test_indexes_bad_values.js b/dom/indexedDB/test/unit/test_indexes_bad_values.js index c695490f74..d8426d60cc 100644 --- a/dom/indexedDB/test/unit/test_indexes_bad_values.js +++ b/dom/indexedDB/test/unit/test_indexes_bad_values.js @@ -74,7 +74,7 @@ function* testSteps() { badObjectStoreData[i].key ); request.onerror = errorHandler; - request.onsuccess = function (event) { + request.onsuccess = function () { if (++addedData == badObjectStoreData.length) { executeSoon(function () { testGenerator.next(); diff --git a/dom/indexedDB/test/unit/test_invalid_version.js b/dom/indexedDB/test/unit/test_invalid_version.js index 79d74ab2cc..ea5e2953d0 100644 --- a/dom/indexedDB/test/unit/test_invalid_version.js +++ b/dom/indexedDB/test/unit/test_invalid_version.js @@ -6,6 +6,7 @@ /* exported testGenerator */ var testGenerator = testSteps(); +// eslint-disable-next-line require-yield function* testSteps() { const name = this.window ? window.location.pathname : "Splendid Test"; diff --git a/dom/indexedDB/test/unit/test_quotaExceeded_recovery.js b/dom/indexedDB/test/unit/test_quotaExceeded_recovery.js index 20366be417..3f5ef96ba4 100644 --- a/dom/indexedDB/test/unit/test_quotaExceeded_recovery.js +++ b/dom/indexedDB/test/unit/test_quotaExceeded_recovery.js @@ -82,14 +82,14 @@ function* testSteps() { event.stopPropagation(); }; - trans.oncomplete = function (event) { + trans.oncomplete = function () { if (iter == 1) { i++; } j++; testGenerator.next(true); }; - trans.onabort = function (event) { + trans.onabort = function () { is(trans.error.name, "QuotaExceededError", "Reached quota limit"); testGenerator.next(false); }; diff --git a/dom/indexedDB/test/unit/test_remove_objectStore.js b/dom/indexedDB/test/unit/test_remove_objectStore.js index bdc16d9a6a..8d4cd17246 100644 --- a/dom/indexedDB/test/unit/test_remove_objectStore.js +++ b/dom/indexedDB/test/unit/test_remove_objectStore.js @@ -28,7 +28,7 @@ function* testSteps() { for (let i = 0; i < 100; i++) { request = objectStore.add({ foo: i }); request.onerror = errorHandler; - request.onsuccess = function (event) { + request.onsuccess = function () { if (++addedCount == 100) { executeSoon(function () { testGenerator.next(); diff --git a/dom/indexedDB/test/unit/test_setVersion_throw.js b/dom/indexedDB/test/unit/test_setVersion_throw.js index 2706c2c2a4..b0b5392ba2 100644 --- a/dom/indexedDB/test/unit/test_setVersion_throw.js +++ b/dom/indexedDB/test/unit/test_setVersion_throw.js @@ -17,7 +17,7 @@ function* testSteps() { let request = indexedDB.open(name, 1); request.onerror = errorHandler; request.onsuccess = grabEventAndContinueHandler; - request.onupgradeneeded = function (event) { + request.onupgradeneeded = function () { info("Got upgradeneeded event for db 1"); }; let event = yield undefined; @@ -36,7 +36,7 @@ function* testSteps() { request = indexedDB.open(name, 2); request.onerror = grabEventAndContinueHandler; request.onsuccess = unexpectedSuccessHandler; - request.onupgradeneeded = function (event) { + request.onupgradeneeded = function () { info("Got upgradeneeded event for db 2"); expectUncaughtException(true); // eslint-disable-next-line no-undef diff --git a/dom/indexedDB/test/unit/test_table_locks.js b/dom/indexedDB/test/unit/test_table_locks.js index e1f3b5e7d6..3363520775 100644 --- a/dom/indexedDB/test/unit/test_table_locks.js +++ b/dom/indexedDB/test/unit/test_table_locks.js @@ -81,7 +81,7 @@ function doReadOnlyTransaction(db, key, remaining) { let cursor = event.target.result; ok(cursor, "Got readonly cursor"); - objectStore.get(cursor.primaryKey).onsuccess = function (event) { + objectStore.get(cursor.primaryKey).onsuccess = function () { if (++key == objDataCount) { key = 0; } @@ -113,7 +113,7 @@ function doReadWriteTransaction(db, key, remaining) { let value = cursor.value; value[idxKeyPathProp]++; - cursor.update(value).onsuccess = function (event) { + cursor.update(value).onsuccess = function () { if (++key == objDataCount) { key = 0; } diff --git a/dom/indexedDB/test/unit/test_transaction_abort.js b/dom/indexedDB/test/unit/test_transaction_abort.js index 6829392842..48f3677e0d 100644 --- a/dom/indexedDB/test/unit/test_transaction_abort.js +++ b/dom/indexedDB/test/unit/test_transaction_abort.js @@ -150,7 +150,7 @@ function* testSteps() { request.onsuccess = grabEventAndContinueHandler; event = yield undefined; - event.target.transaction.onabort = function (event) { + event.target.transaction.onabort = function () { ok(false, "Shouldn't see an abort event!"); }; event.target.transaction.oncomplete = grabEventAndContinueHandler; @@ -168,7 +168,7 @@ function* testSteps() { key = event.target.result; event.target.transaction.onabort = grabEventAndContinueHandler; - event.target.transaction.oncomplete = function (event) { + event.target.transaction.oncomplete = function () { ok(false, "Shouldn't see a complete event here!"); }; @@ -303,7 +303,7 @@ function* testSteps() { r.onerror = abortErrorHandler; } makeNewRequest(); - transaction.objectStore("foo").get(1).onsuccess = function (event) { + transaction.objectStore("foo").get(1).onsuccess = function () { executeSoon(function () { transaction.abort(); expectedAbortEventCount++; @@ -315,7 +315,7 @@ function* testSteps() { // During COMMITTING transaction = db.transaction("foo", "readwrite"); transaction.objectStore("foo").put({ hello: "world" }, 1).onsuccess = - function (event) { + function () { continueToNextStep(); }; yield undefined; @@ -335,11 +335,10 @@ function* testSteps() { // Abort both failing and succeeding requests transaction = db.transaction("foo", "readwrite"); transaction.onabort = transaction.oncomplete = grabEventAndContinueHandler; - transaction.objectStore("foo").add({ indexKey: "key" }).onsuccess = function ( - event - ) { - transaction.abort(); - }; + transaction.objectStore("foo").add({ indexKey: "key" }).onsuccess = + function () { + transaction.abort(); + }; let request1 = transaction.objectStore("foo").add({ indexKey: "key" }); request1.onsuccess = grabEventAndContinueHandler; request1.onerror = grabEventAndContinueHandler; diff --git a/dom/indexedDB/test/unit/test_transaction_abort_hang.js b/dom/indexedDB/test/unit/test_transaction_abort_hang.js index 6a2c61128b..cb7e4f7133 100644 --- a/dom/indexedDB/test/unit/test_transaction_abort_hang.js +++ b/dom/indexedDB/test/unit/test_transaction_abort_hang.js @@ -47,7 +47,7 @@ function* testSteps() { // Last one, finish the test. transaction.oncomplete = grabEventAndContinueHandler; } else if (i == abortedTransactionIndex - 1) { - transaction.oncomplete = function (event) { + transaction.oncomplete = function () { ok( true, "Completed transaction " + @@ -84,7 +84,7 @@ function* testSteps() { transaction.abort(); }); } else { - transaction.oncomplete = function (event) { + transaction.oncomplete = function () { ok(true, "Completed transaction " + ++completedTransactionCount); }; } diff --git a/dom/indexedDB/test/unit/xpcshell-head-parent-process.js b/dom/indexedDB/test/unit/xpcshell-head-parent-process.js index f297b72d25..f6bd2608ef 100644 --- a/dom/indexedDB/test/unit/xpcshell-head-parent-process.js +++ b/dom/indexedDB/test/unit/xpcshell-head-parent-process.js @@ -28,7 +28,7 @@ function isnot(a, b, msg) { Assert.notEqual(a, b, msg); } -function todo(condition, name, diag) { +function todo(condition) { todo_check_true(condition); } @@ -122,7 +122,7 @@ function expectedErrorHandler(name) { }; } -function expectUncaughtException(expecting) { +function expectUncaughtException() { // This is dummy for xpcshell test. } @@ -196,19 +196,19 @@ function compareKeys(k1, k2) { return false; } -function addPermission(permission, url) { +function addPermission() { throw new Error("addPermission"); } -function removePermission(permission, url) { +function removePermission() { throw new Error("removePermission"); } -function allowIndexedDB(url) { +function allowIndexedDB() { throw new Error("allowIndexedDB"); } -function disallowIndexedDB(url) { +function disallowIndexedDB() { throw new Error("disallowIndexedDB"); } @@ -240,7 +240,7 @@ function scheduleGC() { function setTimeout(fun, timeout) { let timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer); var event = { - notify(timer) { + notify() { fun(); }, }; diff --git a/dom/indexedDB/test/unit/xpcshell-parent-process.toml b/dom/indexedDB/test/unit/xpcshell-parent-process.toml index d63e3d6bf2..01740cdd82 100644 --- a/dom/indexedDB/test/unit/xpcshell-parent-process.toml +++ b/dom/indexedDB/test/unit/xpcshell-parent-process.toml @@ -44,6 +44,10 @@ skip-if = ["true"] # Only used for recreating URLSearchParams_profile.zip requesttimeoutfactor = 2 skip-if = ["tsan"] +["test_connection_idle_maintenance.js"] + +["test_connection_idle_maintenance_stop.js"] + ["test_database_close_without_onclose.js"] ["test_database_onclose.js"] -- cgit v1.2.3