Bug 1428014 - Fix intermittent on browser_webconsole_close_sidebar.js; r=bgrins.
authorNicolas Chevobbe <nchevobbe@mozilla.com>
Mon, 08 Jan 2018 09:47:50 +0100
changeset 452628 a9c97c2aa4b9551ca53a3b22163c0d0ddf784b3d
parent 452589 4248602674ff589f368a4b868fa4743a033640e4
child 452629 ec12b49871a4e7a349e26e92d0edc5242c12d27b
push id1648
push usermtabara@mozilla.com
push dateThu, 01 Mar 2018 12:45:47 +0000
treeherdermozilla-release@cbb9688c2eeb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbgrins
bugs1428014
milestone59.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 1428014 - Fix intermittent on browser_webconsole_close_sidebar.js; r=bgrins. The test was failing because it still had pending request to the server while shutting down the toolbox. This request was probably the one to retrieve the properties of the object we put in the sidebar. By waiting the object properties to be fully loaded when opening the sidebar, we should make the intermittent go away. MozReview-Commit-ID: 7tY8hvbDVRp
devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_close_sidebar.js
--- a/devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_close_sidebar.js
+++ b/devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_close_sidebar.js
@@ -82,9 +82,13 @@ async function showSidebar(hud) {
   let wrapper = hud.ui.document.querySelector(".webconsole-output-wrapper");
   let onSidebarShown = waitForNodeMutation(wrapper, { childList: true });
 
   let contextMenu = await openContextMenu(hud, objectNode);
   let openInSidebar = contextMenu.querySelector("#console-menu-open-sidebar");
   openInSidebar.click();
   await onSidebarShown;
   await hideContextMenu(hud);
+
+  // Let's wait for the object inside the sidebar to be expanded.
+  await waitFor(() =>
+    wrapper.querySelectorAll(".sidebar .tree-node").length > 1, null, 100);
 }