Bug 1569676 - Wait for toolbox to be loaded before closing the toolbox in browser_toolbox_toolbar_reorder_with_secondary_toolbox.js. r=jdescottes

A RDP request is made during toolbox opening and this request isn't awaited for
during the call to gDevTools.showToolbox. This relates to the autohide menu.
Await for this request to be finished and the DOM elements relating to it to be disabled
before trying to close the toolbox.

Differential Revision: https://phabricator.services.mozilla.com/D39715

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Alexandre Poirot 2019-08-12 13:47:31 +00:00
Родитель bfa5a24744
Коммит 8e1aada916
1 изменённых файлов: 6 добавлений и 0 удалений

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

@ -30,6 +30,12 @@ add_task(async function() {
Services.prefs.setCharPref("devtools.toolbox.selectedTool", "memory");
const toolbox = await gDevToolsBrowser.openContentProcessToolbox(gBrowser);
// A RDP request is made during toolbox opening and this request isn't awaited for
// during the call to gDevTools.showToolbox. This relates to the autohide menu.
// Await for this request to be finished and the DOM elements relating to it to be disabled
// before trying to close the toolbox.
await waitForDOM(toolbox.win.document, "#toolbox-meatball-menu-noautohide");
info(
"Check whether the value of devtools.toolbox.tabsOrder was not affected after closed"
);