Bug 1528140 - Wait for requests to settle after aboutdebugging tab is selected;r=daisuke

We should wait until the selected tab has been updated because we fetch tabs when the selected index changes.

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Julian Descottes 2019-02-18 07:03:21 +00:00
Родитель 79fdd8bd67
Коммит 6c3d75cad6
1 изменённых файлов: 7 добавлений и 4 удалений

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

@ -91,11 +91,14 @@ async function openAboutDevtoolsToolbox(doc, tab, win) {
}
async function closeAboutDevtoolsToolbox(devtoolsTab, win) {
info("Close about:devtools-toolbox page");
const onToolboxDestroyed = gDevTools.once("toolbox-destroyed");
await removeTab(devtoolsTab);
await Promise.all([
waitForRequestsToSettle(win.AboutDebugging.store),
gDevTools.once("toolbox-destroyed"),
]);
await onToolboxDestroyed;
// Changing the tab will also trigger a request to list tabs, so wait until the selected
// tab has changed to wait for requests to settle.
await waitUntil(() => gBrowser.selectedTab !== devtoolsTab);
await waitForRequestsToSettle(win.AboutDebugging.store);
}
async function reloadAboutDebugging(tab) {