From b7edb77774e27db3a43e66dde91e6fde22d27d21 Mon Sep 17 00:00:00 2001 From: Hubert Boma Manilla Date: Tue, 29 Oct 2024 08:29:19 +0000 Subject: [PATCH] Bug 1832017 - [devtools] Wait for updates to complete so popups do not lose focus mid assertion r=devtools-reviewers,nchevobbe Differential Revision: https://phabricator.services.mozilla.com/D227038 --- .../client/debugger/test/mochitest/browser_dbg-blackbox.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/devtools/client/debugger/test/mochitest/browser_dbg-blackbox.js b/devtools/client/debugger/test/mochitest/browser_dbg-blackbox.js index 88e28a82342e..7fee9f485293 100644 --- a/devtools/client/debugger/test/mochitest/browser_dbg-blackbox.js +++ b/devtools/client/debugger/test/mochitest/browser_dbg-blackbox.js @@ -535,6 +535,12 @@ async function assertGutterBlackBoxBoxContextMenuItems(dbg, testFixtures) { info( "Asserts that the gutter context menu items when clicking on the gutter of a nonBlackboxed line" ); + + // Wait for CM6 to complete any updates so the popup + // does not lose focus while asserting the context menu items due + // late updates completion. + await waitForDocumentLoadComplete(dbg); + const popup = await openContextMenuInDebugger( dbg, "gutterElement",