diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:33 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:33 +0000 |
commit | 086c044dc34dfc0f74fbe41f4ecb402b2cd34884 (patch) | |
tree | a4f824bd33cb075dd5aa3eb5a0a94af221bbe83a /services/sync/tests/unit/test_clients_engine.js | |
parent | Adding debian version 124.0.1-1. (diff) | |
download | firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.tar.xz firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.zip |
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'services/sync/tests/unit/test_clients_engine.js')
-rw-r--r-- | services/sync/tests/unit/test_clients_engine.js | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/services/sync/tests/unit/test_clients_engine.js b/services/sync/tests/unit/test_clients_engine.js index d910a67503..9a5115db4e 100644 --- a/services/sync/tests/unit/test_clients_engine.js +++ b/services/sync/tests/unit/test_clients_engine.js @@ -125,7 +125,7 @@ add_task(async function test_bad_hmac() { check_clients_count(0); await syncClientsEngine(server); check_clients_count(1); - ok(engine.lastRecordUpload > 0); + Assert.greater(engine.lastRecordUpload, 0); ok(!engine.isFirstSync); // Our uploaded record has a version. @@ -275,7 +275,7 @@ add_task(async function test_full_sync() { strictEqual(engine.lastRecordUpload, 0); ok(engine.isFirstSync); await syncClientsEngine(server); - ok(engine.lastRecordUpload > 0); + Assert.greater(engine.lastRecordUpload, 0); ok(!engine.isFirstSync); deepEqual( user.collection("clients").keys().sort(), @@ -333,7 +333,7 @@ add_task(async function test_sync() { ok(engine.isFirstSync); await syncClientsEngine(server); ok(!!clientWBO().payload); - ok(engine.lastRecordUpload > 0); + Assert.greater(engine.lastRecordUpload, 0); ok(!engine.isFirstSync); _( @@ -344,7 +344,7 @@ add_task(async function test_sync() { clientWBO().payload = undefined; await syncClientsEngine(server); ok(!!clientWBO().payload); - ok(engine.lastRecordUpload > lastweek); + Assert.greater(engine.lastRecordUpload, lastweek); ok(!engine.isFirstSync); _("Remove client record."); @@ -394,8 +394,8 @@ add_task(async function test_client_name_change() { changedIDs = await tracker.getChangedIDs(); equal(Object.keys(changedIDs).length, 1); ok(engine.localID in changedIDs); - ok(tracker.score > initialScore); - ok(tracker.score >= SCORE_INCREMENT_XLARGE); + Assert.greater(tracker.score, initialScore); + Assert.greaterOrEqual(tracker.score, SCORE_INCREMENT_XLARGE); await tracker.stop(); @@ -425,8 +425,8 @@ add_task(async function test_fxa_device_id_change() { changedIDs = await tracker.getChangedIDs(); equal(Object.keys(changedIDs).length, 1); ok(engine.localID in changedIDs); - ok(tracker.score > initialScore); - ok(tracker.score >= SINGLE_USER_THRESHOLD); + Assert.greater(tracker.score, initialScore); + Assert.greaterOrEqual(tracker.score, SINGLE_USER_THRESHOLD); await tracker.stop(); @@ -477,7 +477,10 @@ add_task(async function test_last_modified() { await engine._uploadOutgoing(); _("Local record should have updated timestamp"); - ok(engine._store._remoteClients[activeID].serverLastModified >= now); + Assert.greaterOrEqual( + engine._store._remoteClients[activeID].serverLastModified, + now + ); _("Record on the server should have new name but not serverLastModified"); let payload = collection.cleartext(activeID); @@ -732,7 +735,7 @@ add_task(async function test_filter_duplicate_names() { strictEqual(engine.lastRecordUpload, 0); ok(engine.isFirstSync); await syncClientsEngine(server); - ok(engine.lastRecordUpload > 0); + Assert.greater(engine.lastRecordUpload, 0); ok(!engine.isFirstSync); deepEqual( user.collection("clients").keys().sort(), @@ -776,7 +779,7 @@ add_task(async function test_filter_duplicate_names() { // Check that a subsequent Sync doesn't report anything as being processed. let counts; - Svc.Obs.add("weave:engine:sync:applied", function observe(subject, data) { + Svc.Obs.add("weave:engine:sync:applied", function observe(subject) { Svc.Obs.remove("weave:engine:sync:applied", observe); counts = subject; }); @@ -915,7 +918,7 @@ add_task(async function test_command_sync() { _("Checking record was uploaded."); notEqual(clientWBO(engine.localID).payload, undefined); - ok(engine.lastRecordUpload > 0); + Assert.greater(engine.lastRecordUpload, 0); ok(!engine.isFirstSync); notEqual(clientWBO(remoteId).payload, undefined); |