diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /storage/test/unit | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-adbda400be353e676059e335c3c0aaf99e719475.tar.xz firefox-adbda400be353e676059e335c3c0aaf99e719475.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'storage/test/unit')
-rw-r--r-- | storage/test/unit/test_connection_executeAsync.js | 20 | ||||
-rw-r--r-- | storage/test/unit/test_connection_interrupt.js | 8 | ||||
-rw-r--r-- | storage/test/unit/test_default_journal_size_limit.js | 2 | ||||
-rw-r--r-- | storage/test/unit/test_statement_executeAsync.js | 6 | ||||
-rw-r--r-- | storage/test/unit/test_storage_connection.js | 4 | ||||
-rw-r--r-- | storage/test/unit/test_storage_progresshandler.js | 2 |
6 files changed, 19 insertions, 23 deletions
diff --git a/storage/test/unit/test_connection_executeAsync.js b/storage/test/unit/test_connection_executeAsync.js index a77299ba3b..49071bbfed 100644 --- a/storage/test/unit/test_connection_executeAsync.js +++ b/storage/test/unit/test_connection_executeAsync.js @@ -49,13 +49,9 @@ add_task(async function test_first_create_and_add() { stmts[1].bindBlobByIndex(3, BLOB, BLOB.length); // asynchronously execute the statements - let execResult = await executeMultipleStatementsAsync( - db, - stmts, - function (aResultSet) { - ok(false, "we only did inserts so we should not have gotten results!"); - } - ); + let execResult = await executeMultipleStatementsAsync(db, stmts, function () { + ok(false, "we only did inserts so we should not have gotten results!"); + }); equal( Ci.mozIStorageStatementCallback.REASON_FINISHED, execResult, @@ -142,13 +138,9 @@ add_task(async function test_last_multiple_bindings_on_statements() { } // Execute asynchronously. - let execResult = await executeMultipleStatementsAsync( - db, - stmts, - function (aResultSet) { - ok(false, "we only did inserts so we should not have gotten results!"); - } - ); + let execResult = await executeMultipleStatementsAsync(db, stmts, function () { + ok(false, "we only did inserts so we should not have gotten results!"); + }); equal( Ci.mozIStorageStatementCallback.REASON_FINISHED, execResult, diff --git a/storage/test/unit/test_connection_interrupt.js b/storage/test/unit/test_connection_interrupt.js index e257e9af82..9849330a0d 100644 --- a/storage/test/unit/test_connection_interrupt.js +++ b/storage/test/unit/test_connection_interrupt.js @@ -41,10 +41,10 @@ add_task( let completePromise = new Promise((resolve, reject) => { let listener = { - handleResult(aResultSet) { + handleResult() { reject(); }, - handleError(aError) { + handleError() { reject(); }, handleCompletion(aReason) { @@ -92,10 +92,10 @@ add_task( let completePromise = new Promise((resolve, reject) => { let listener = { - handleResult(aResultSet) { + handleResult() { reject(); }, - handleError(aError) { + handleError() { reject(); }, handleCompletion(aReason) { diff --git a/storage/test/unit/test_default_journal_size_limit.js b/storage/test/unit/test_default_journal_size_limit.js index f2d28b9aa4..fa03d9654c 100644 --- a/storage/test/unit/test_default_journal_size_limit.js +++ b/storage/test/unit/test_default_journal_size_limit.js @@ -10,7 +10,7 @@ async function check_journal_size(db) { handleResult(resultSet) { resolve(resultSet.getNextRow().getResultByIndex(0)); }, - handleError(error) { + handleError() { reject(); }, handleCompletion() {}, diff --git a/storage/test/unit/test_statement_executeAsync.js b/storage/test/unit/test_statement_executeAsync.js index dab15121a5..ba1a652200 100644 --- a/storage/test/unit/test_statement_executeAsync.js +++ b/storage/test/unit/test_statement_executeAsync.js @@ -463,13 +463,13 @@ function test_partial_listener_works() { var stmt = makeTestStatement("DELETE FROM test WHERE id = ?"); stmt.bindByIndex(0, 0); stmt.executeAsync({ - handleResult(aResultSet) {}, + handleResult() {}, }); stmt.executeAsync({ - handleError(aError) {}, + handleError() {}, }); stmt.executeAsync({ - handleCompletion(aReason) {}, + handleCompletion() {}, }); stmt.finalize(); diff --git a/storage/test/unit/test_storage_connection.js b/storage/test/unit/test_storage_connection.js index e7175a9613..4636e3edbb 100644 --- a/storage/test/unit/test_storage_connection.js +++ b/storage/test/unit/test_storage_connection.js @@ -980,6 +980,10 @@ add_task(async function test_variableLimit() { info("Open connection"); let db = Services.storage.openDatabase(getTestDB()); Assert.equal(db.variableLimit, 32766, "Should return default limit"); + db.variableLimit = 999; + Assert.equal(db.variableLimit, 999, "Should return the set limit"); + db.variableLimit = 33000; + Assert.equal(db.variableLimit, 32766, "Should silently truncate"); await asyncClose(db); }); diff --git a/storage/test/unit/test_storage_progresshandler.js b/storage/test/unit/test_storage_progresshandler.js index e2e01eb2ff..5e2af4a984 100644 --- a/storage/test/unit/test_storage_progresshandler.js +++ b/storage/test/unit/test_storage_progresshandler.js @@ -26,7 +26,7 @@ var testProgressHandler = { calls: 0, abort: false, - onProgress(comm) { + onProgress() { ++this.calls; return this.abort; }, |