Commit 0f111893 authored by Simon Friedberger's avatar Simon Friedberger Committed by sfriedberger@mozilla.com
Browse files

Bug 1960313: Stop throwing unneeded notification for stale credit card entry notifications r=dimi

parent 27594c2a
Loading
Loading
Loading
Loading
+0 −5
Changes for browser/extensions/formautofill/test/unit/test_addressRecords.js: 0 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -366,11 +366,6 @@ add_task(async function test_notifyUsed() {
    getSyncChangeCounter(profileStorage.addresses, guid),
    changeCounter
  );

  Assert.throws(
    () => profileStorage.addresses.notifyUsed("INVALID_GUID"),
    /No matching record\./
  );
});

add_task(async function test_remove() {
+0 −5
Changes for browser/extensions/formautofill/test/unit/test_creditCardRecords.js: 0 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -469,11 +469,6 @@ add_task(async function test_notifyUsed() {

  Assert.equal(creditCard.timesUsed, timesUsed + 1);
  Assert.notEqual(creditCard.timeLastUsed, timeLastUsed);

  Assert.throws(
    () => profileStorage.creditCards.notifyUsed("INVALID_GUID"),
    /No matching record\./
  );
});

add_task(async function test_remove() {
+3 −1
Changes for toolkit/components/formautofill/FormAutofillStorageBase.sys.mjs: 3 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -539,7 +539,9 @@ class AutofillRecords {

    let recordFound = this._findByGUID(guid);
    if (!recordFound) {
      throw new Error("No matching record.");
      // record must have been deleted, nothing to update
      this.log.debug("Cannot notify. No record found with guid:", guid);
      return;
    }

    recordFound.timesUsed++;