Closed Bug 1720174 Opened 3 years ago Closed 2 years ago

fix browser_font_size.js, browser_remove_text_styling.js and browser_text_styling.js tests

Categories

(Thunderbird :: Message Compose Window, enhancement, P2)

enhancement

Tracking

(thunderbird_esr91 wontfix)

RESOLVED FIXED
98 Branch
Tracking Status
thunderbird_esr91 --- wontfix

People

(Reporter: mkmelin, Assigned: henry-x)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

+++ This bug was initially created as a clone of Bug #1667372 +++

This is a follow-up to bug 1667372 to make the tests work properly:

  • comm/mail/test/browser/composition/browser_font_size.js
  • comm/mail/test/browser/composition/browser_remove_text_styling.js
  • comm/mail/test/browser/composition/browser_text_styling.js

We should probably only block these for linux (and continue to block it for mac, for native menu reasons). I don't think there are any intermittent for windows. Especially if the unblocked browser_paragraph_state.js is anything to go on: Bug 1720470.

See Also: → 1720470

I couldn't reproduce the failures with either of the three tests using ./mach test --verify --headless locally (on fedora). My machine is relatively slow, so maybe these require a faster machine to reproduce.

I'm taking another look at these tests.

To give some context. In the test, we're trying to open a Format sub-menu by calling essentially

shownPromise = BrowserTestUtils.waitForEvent(formatMenu, "popupshown");
formatMenu.openMenu(true);
await shownPromise;
shownPromise = BrowserTestUtils.waitForEvent(subMenu, "popupshown");
subMenu.openMenu(true);
await shownPromise;

This works in most tests, but the failing ones hang at the last step. According to the try server screenshots, which is taken when the test expires, the "Format" menu is closed. So the "Format" menu does get shown, but then it gets closed instead of showing the sub-menu.

I tried these on a different faster machine and I still can't reproduce locally (same OS though). Maybe it's a windows manager issue since I think they are responsible for displaying popups (I'm using Wayland, rather than X11 which is used on the try server) 🤷

I'll try and get some more debugging information from the try server.

Hmm, it's still not clear what is causing this. On the try server, in the failing cases, it seems that after calling openMenu(true) the menu goes through popupshowing -> popuphiding -> popuphidden. I.e. something is cancelling the popup sequence before popupshown is fired. I think it is probably coming from the mozilla-central low-level code, which makes this difficult to debug on the try server.

@mkmelin, you said before that you could reproduce the failures locally with --verify. Is that still the case? If so, can you see if you have any more luck debugging locally?

Flags: needinfo?(mkmelin+mozilla)

I can't reproduce locally anymore.
One thing that's hit us much in the past is window focus issues. Perhaps we should add a win.focus() at https://searchfox.org/comm-central/rev/d55e12934777fded86d5ad1e8bd6a6d3a8ac32b0/mail/components/extensions/test/browser/head.js#483 to make sure that is not the issue here.

Flags: needinfo?(mkmelin+mozilla)

(In reply to Magnus Melin [:mkmelin] from comment #5)

One thing that's hit us much in the past is window focus issues. Perhaps we should add a win.focus() at https://searchfox.org/comm-central/rev/d55e12934777fded86d5ad1e8bd6a6d3a8ac32b0/mail/components/extensions/test/browser/head.js#483 to make sure that is not the issue here.

I added a window focus call before opening any menu (https://hg.mozilla.org/try-comm-central/rev/166b65cf813710846b5dbf344bdc10918ebb243f#l2.12), but it failed in the same way on the try server. So it doesn't seem to be that.

I'm going to see if simply trying with a second attempt works.

The formatting menus can sometimes fail to open during the tests. We now allow this to fail once. As such, we can re-enable tests for windows and linux.

Blocks: 1720470

Let's see how the patch goes.

Status: NEW → ASSIGNED
Target Milestone: --- → 98 Branch

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/93db57326342
Attempt to open menus twice in composition formatting tests. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: