Bug 1770288 - Fix wrong parameter type signature in AddonTestUtils.checkMessages call in browser_ext_tabs_insertCSS.js. r=willdurand

This other call to AddonTestUtils.checkMessage is also using a `forbidden` option wrongly set to the regular expression,
and the manual `messages.filter(...)` is definitely a workaround for preventing an intermittent similar to the one
fixed in the other patch. Better to fix this other call even if not strictly related to this bugzilla issue.

Depends on D146935

Differential Revision: https://phabricator.services.mozilla.com/D146936
This commit is contained in:
Luca Greco 2022-05-23 17:19:38 +00:00
Родитель eb7d2f2d42
Коммит e6655bddff
1 изменённых файлов: 1 добавлений и 9 удалений

Просмотреть файл

@ -300,18 +300,10 @@ add_task(async function test_csscode_cleanup_on_closed_windows() {
// Look for nsIDOMWindowUtils.removeSheet and
// nsIDOMWindowUtils.removeSheetUsingURIString errors.
messages = messages.filter(
m =>
m.errorMessage &&
m.errorMessage.includes(
"(NS_ERROR_FAILURE) [nsIDOMWindowUtils.removeSheet"
)
);
AddonTestUtils.checkMessages(
messages,
{
forbidden: [/nsIDOMWindowUtils.removeSheet/],
forbidden: [{ errorMessage: /nsIDOMWindowUtils.removeSheet/ }],
},
"Expect no remoteSheet errors"
);