Bug 1569676 - Wait for toolbox to be loaded before closing the toolbox in browser_toolbox_toolbar_reorder_with_secondary_toolbox.js. r=jdescottes
authorAlexandre Poirot <poirot.alex@gmail.com>
Mon, 12 Aug 2019 13:47:31 +0000
changeset 487472 b22b74e628da2a21b32dd3e45b985fa9da38b1a6
parent 487471 87c9fe6c03f158ec8770457e86dd31aa4435b49d
child 487473 b6ca3d7e647b9c1269b09f61e780ca595c4d04f3
push id92271
push userapoirot@mozilla.com
push dateMon, 12 Aug 2019 14:17:52 +0000
treeherderautoland@b22b74e628da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdescottes
bugs1569676
milestone70.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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
devtools/client/framework/test/browser_toolbox_toolbar_reorder_with_secondary_toolbox.js
--- a/devtools/client/framework/test/browser_toolbox_toolbar_reorder_with_secondary_toolbox.js
+++ b/devtools/client/framework/test/browser_toolbox_toolbar_reorder_with_secondary_toolbox.js
@@ -25,16 +25,22 @@ add_task(async function() {
   );
 
   info("Prepare the toolbox on browser content toolbox");
   await addTab(`${URL_ROOT}doc_empty-tab-01.html`);
   // Select "memory" tool from first, because the webconsole might connect to the content.
   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"
   );
   const onToolboxDestroyed = toolbox.once("destroyed");
   toolbox.win.top.close();
   await onToolboxDestroyed;
   is(
     Services.prefs.getCharPref("devtools.toolbox.tabsOrder"),