Bug 1703806 - [devtools] Use the reloaded event in DAMP tests for the a11y panel r=nchevobbe,perftest-reviewers

Depends on D110247

Differential Revision: https://phabricator.services.mozilla.com/D111258
This commit is contained in:
Julian Descottes 2021-04-09 07:30:48 +00:00
parent 762db8b745
commit a1fe979044

View File

@ -7,8 +7,6 @@
const Services = require("Services");
const { openToolboxAndLog, reloadPageAndLog } = require("damp-test/tests/head");
const INITIALIZED_EVENT = "Accessibility:Initialized";
const PREF_ACCESSIBILITY_FORCE_DISABLED = "accessibility.force_disabled";
exports.shutdownAccessibilityService = function() {
@ -31,7 +29,7 @@ exports.openAccessibilityAndLog = function(label) {
exports.reloadAccessibilityAndLog = async function(label, toolbox) {
const onReload = async function() {
let accessibility = await toolbox.getPanelWhenReady("accessibility");
await accessibility.panelWin.once(INITIALIZED_EVENT);
await accessibility.once("reloaded");
};
await reloadPageAndLog(`${label}.accessibility`, toolbox, onReload);