From b6def6b66909edbf7ddbd6e53e92c9c72a6121c3 Mon Sep 17 00:00:00 2001 From: Brad Werth Date: Tue, 20 Apr 2021 21:47:11 +0000 Subject: [PATCH] Bug 1704628 Part 2: Make a breakpoint context menu test await the correct number of dispatch events. r=ochameau Bug 1524374 has landed and making the proposed change makes this test work correctly with macOS native context menus. Differential Revision: https://phabricator.services.mozilla.com/D111948 --- .../debugger/test/mochitest/browser_dbg-breakpoints-actions.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/devtools/client/debugger/test/mochitest/browser_dbg-breakpoints-actions.js b/devtools/client/debugger/test/mochitest/browser_dbg-breakpoints-actions.js index 761ef14d310f..4ba7bafc55c0 100644 --- a/devtools/client/debugger/test/mochitest/browser_dbg-breakpoints-actions.js +++ b/devtools/client/debugger/test/mochitest/browser_dbg-breakpoints-actions.js @@ -30,12 +30,7 @@ add_task(async function() { openFirstBreakpointContextMenu(dbg); // select "Disable Others" - // FIXME bug 1524374 this waitForDispatch call only sees one dispatch for - // SET_BREAKPOINT even though three are triggered, due to the order in - // which promises get resolved. The problem seems to indicate a coverage gap - // in waitUntilService(). Workaround this by only waiting for one dispatch, - // though this is fragile and could break again in the future. - let dispatched = waitForDispatch(dbg.store, "SET_BREAKPOINT", /* 2*/ 1); + let dispatched = waitForDispatch(dbg.store, "SET_BREAKPOINT", 2); selectContextMenuItem(dbg, selectors.breakpointContextMenu.disableOthers); await waitForState(dbg, state => dbg.selectors -- 2.11.4.GIT