Loading
Bug 1373234 - Avoid races in tests involving menu creation r=mixedpuppy
browser.menus.create and browser.contextMenus.create are asynchronous APIs. For compatibility reasons, they cannot return a promise (since they already return an integer). This modifies all tests that use either of these APIs, to ensure that the test waits for the callback of the last menus/contextMenus.create call before continuing with the test. In some cases in browser_ext_menus.js I did not add any callbacks, because there were other asynchronous API calls (browser.tabs API) that already guaranteed that the test made a round-trip to the parent process before continuing. This fixes: - Bug 1462862 (browser_ext_contextMenus_icons.js) - Bug 1403429 (browser_ext_contextMenus_onclick.js) - Bug 1321182 (browser_ext_contextMenus.js) - Bug 1373234 (browser_ext_menus.js) MozReview-Commit-ID: IZFUyIw8Tbl --HG-- extra : rebase_source : 4f28acf0189b4b93808b13200cf966a04873bf78