mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-24 02:35:41 +00:00
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:
parent
79fdd8bd67
commit
6c3d75cad6
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user