fix browser_font_size.js, browser_remove_text_styling.js and browser_text_styling.js tests
Categories
(Thunderbird :: Message Compose Window, enhancement, P2)
Tracking
(thunderbird_esr91 wontfix)
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
Assignee | ||
Comment 1•3 years ago
|
||
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.
Assignee | ||
Comment 2•3 years ago
|
||
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.
Assignee | ||
Comment 3•2 years ago
•
|
||
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.
Assignee | ||
Comment 4•2 years ago
|
||
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?
Reporter | ||
Comment 5•2 years ago
|
||
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.
Assignee | ||
Comment 6•2 years ago
|
||
(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.
Assignee | ||
Comment 7•2 years ago
|
||
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.
Assignee | ||
Comment 8•2 years ago
|
||
Try run with the latest patch https://treeherder.mozilla.org/jobs?repo=try-comm-central&revision=1895028d34b4784fb49c6db00396d861d9b3f428
Reporter | ||
Updated•2 years ago
|
Comment 10•2 years ago
|
||
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/93db57326342
Attempt to open menus twice in composition formatting tests. r=mkmelin
Description
•