Bug 1891742 - Try to fix intermittent comm/mail/test/browser/composition/browser_quoteMessage.js failure. r=freaktechnik

The logs show complaint about null gMsgCompose.
Also make some tests work with verify.

Differential Revision: https://phabricator.services.mozilla.com/D207772

--HG--
extra : amend_source : 1406206c7972d55f7bcdd37a88663ca0f1bb43f0
This commit is contained in:
Magnus Melin 2024-04-19 17:37:03 +02:00
Родитель 5b7364ee7f
Коммит c731f5f4e4
4 изменённых файлов: 5 добавлений и 4 удалений

Просмотреть файл

@ -7450,7 +7450,7 @@ async function ComposeChangeLanguage(languages) {
if (gSpellCheckingEnabled && checker?.spellCheckPending) {
await new Promise(resolve => {
Services.obs.addObserver(function observe(subject, topic) {
if (subject == gMsgCompose.editor) {
if (!gMsgCompose || subject == gMsgCompose.editor) {
Services.obs.removeObserver(observe, topic);
resolve();
}

Просмотреть файл

@ -32,6 +32,7 @@ var folderToSendFrom;
add_setup(async function () {
requestLongerTimeout(2);
folderToSendFrom = await create_folder("FolderWithUTF8");
registerCleanupFunction(() => folderToSendFrom.deleteSelf(null));
});
function check_content(window) {

Просмотреть файл

@ -28,6 +28,7 @@ var folderToStoreMessages;
add_setup(async function () {
folderToStoreMessages = await create_folder("QuoteTestFolder");
registerCleanupFunction(() => folderToStoreMessages.deleteSelf(null));
});
add_task(async function test_quoteMessage() {

Просмотреть файл

@ -715,9 +715,8 @@ export async function click_tree_row(aTree, aRowIndex) {
async function _get_row_at_index(aViewIndex) {
const win = get_about_3pane();
const tree = win.document.getElementById("threadTree");
Assert.greater(
tree.view.rowCount,
aViewIndex,
await TestUtils.waitForCondition(
() => aViewIndex < tree.view.rowCount,
`index ${aViewIndex} must exist to be clicked on`
);
tree.scrollToIndex(aViewIndex, true);