Closed Bug 1770804 Opened 2 years ago Closed 2 years ago

Fix remaining calls to AddonTestUtils.checkMessages using the wrong format for the options and make checkMessages to throw to make it harder to miss that kind of mistake

Categories

(WebExtensions :: General, task, P3)

task

Tracking

(firefox102 fixed)

RESOLVED FIXED
102 Branch
Tracking Status
firefox102 --- fixed

People

(Reporter: rpl, Assigned: rpl)

References

Details

Attachments

(2 files)

While looking to Bug 1770288 we noticed that the intermittent failure was due to the test using the wrong type signature in the call to AddonTestUtils.checkMessages (See Bug 1770288 comment 3) and that was actually not the only test using the wrong type signature for that same parameter (See Bug 1770288 comment 4).

From a quick look on searchfox it seems there may be some more (e.g. this one looks also to be using the wrong format for the expected option: https://searchfox.org/mozilla-central/rev/70cf6863bd85af2a3188ec1fe5209a3ec1b2de86/browser/components/extensions/test/browser/browser_ext_windows_create_params.js#116-118).

This follow up is meant to track the following additional changes:

  • make AddonTestUtils.checkMessages to throw an explicit error if the format of the expected and forbidden options isn't the right one
  • fix any remaining call still using the wrong option format

Pushed to try to double-check how many more AddonTestUtils.checkMessages may be using the wrong format for the expected and forbidden options would be caught by explicitly validating those two options:

Attachment #9277912 - Attachment description: WIP: Bug 1770804 - validate forbidden and expected AddonTestUtils.checkMessages options for common mistakes. → Bug 1770804 - validate forbidden and expected AddonTestUtils.checkMessages options for common mistakes. r?willdurand!
Pushed by luca.greco@alcacoop.it:
https://hg.mozilla.org/integration/autoland/rev/560f9a8276ff
Fix wrong format for the expected option used in browser_ext_windows_create_params.js AddonTestUtils.checkMessages call. r=willdurand
https://hg.mozilla.org/integration/autoland/rev/e06cf44e3b0a
validate forbidden and expected AddonTestUtils.checkMessages options for common mistakes. r=willdurand
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 102 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: