зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1700106 - [devtools] Remove the balanced-observers eslint disabling from DevTools mochitests. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D109476
This commit is contained in:
Родитель
ddbcbd77a1
Коммит
d43cb93f72
|
@ -11,8 +11,6 @@ module.exports = {
|
|||
rules: {
|
||||
// Allow non-camelcase so that run_test doesn't produce a warning.
|
||||
camelcase: "off",
|
||||
// Tests don't have to cleanup observers
|
||||
"mozilla/balanced-observers": 0,
|
||||
// Tests can always import anything.
|
||||
"mozilla/reject-some-requires": 0,
|
||||
},
|
||||
|
|
|
@ -112,6 +112,9 @@ var httpObserver = function(subject, topic, state) {
|
|||
}
|
||||
};
|
||||
Services.obs.addObserver(httpObserver, "http-on-modify-request");
|
||||
registerCleanupFunction(() => {
|
||||
Services.obs.removeObserver(httpObserver, "http-on-modify-request");
|
||||
});
|
||||
|
||||
function onMessage({ data }) {
|
||||
assertEvent(data.event, data.data);
|
||||
|
|
|
@ -113,7 +113,10 @@ function waitForDelayedStartupFinished(win) {
|
|||
return new Promise(resolve => {
|
||||
Services.obs.addObserver(function observer(subject, topic) {
|
||||
if (win == subject) {
|
||||
Services.obs.removeObserver(observer, topic);
|
||||
Services.obs.removeObserver(
|
||||
observer,
|
||||
"browser-delayed-startup-finished"
|
||||
);
|
||||
resolve();
|
||||
}
|
||||
}, "browser-delayed-startup-finished");
|
||||
|
|
Загрузка…
Ссылка в новой задаче