/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
/* globals synthesizeMouseAtCenterAndRetry, awaitBrowserLoaded, closeMenuPopup, clickItemInMenuPopup, openSubMenuPopup */
var { ExtensionPermissions } = ChromeUtils.importESModule(
"resource://gre/modules/ExtensionPermissions.sys.mjs"
);
var { mailTestUtils } = ChromeUtils.importESModule(
"resource://testing-common/mailnews/MailTestUtils.sys.mjs"
);
const treeClick = mailTestUtils.treeClick.bind(null, EventUtils, window);
const URL_BASE =
"http://mochi.test:8888/browser/comm/mail/components/extensions/test/browser/data";
/**
* Right-click on something in a content document and wait for the context
* menu to appear.
*
* @param {Element} menu - The