Closed Bug 1747056 Opened 5 months ago Closed 4 months ago

MessageDisplayAction buttons ignore theme_icons

Categories

(Thunderbird :: Add-Ons: Extensions API, defect)

defect

Tracking

(thunderbird_esr91 wontfix)

RESOLVED FIXED
98 Branch
Tracking Status
thunderbird_esr91 --- wontfix

People

(Reporter: TbSync, Assigned: TbSync)

Details

Attachments

(2 files)

No description provided.
Assignee: nobody → john
Status: NEW → ASSIGNED

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/ff6f7251f84d
Make MessageDisplayAction buttons use the defined theme_icons. r=Paenglab

Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 97 Branch

This is apparently causing comm/mail/components/extensions/test/browser/browser_ext_browserAction.js to fail.
It's an intermittent but almost perma on CI. Can be reproduced locally with --verify, but not without. (Backing out the patch -> verify succeeds)

Flags: needinfo?(john)
Status: RESOLVED → REOPENED
Resolution: FIXED → ---

Apparently, enabling the default theme does not work reliably for Linux tests. I changed the tests to start with enabling the light and dark themes and then disable the selected theme, which enables the default theme. This gave me no more failures with --verify

Flags: needinfo?(john)

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/994662a74ca3
Make MessageDisplayAction buttons use the defined theme_icons. r=Paenglab

Status: REOPENED → RESOLVED
Closed: 5 months ago4 months ago
Resolution: --- → FIXED
Target Milestone: 97 Branch → 98 Branch

I am having a hard time to get the test working. On my local linux system, the default theme picks the "light" icon for the compose action button, but on our test infra it takes the "default" icon (like it does for windows on my machine as well).

I could of course just adjust the test to pass on our test infra, but I would like to make it in a way, that it always works.

a) do you have any idea what might cause this?
b) can I enforce a consistent behavior?
c) can I detect what the used icon should be by checking an attribute or alike?

Failing test:
comm/mail/components/extensions/test/browser/browser_ext_composeAction.js

Fail report:
https://treeherder.mozilla.org/jobs?repo=try-comm-central&author=john.bieling%40gmx.de&selectedTaskRun=HlpTj-PQQEKX46z5he-xbw.0

Flags: needinfo?(richard.marti)

What Linux theme do you use (a dark?) and what theme uses the infra (probably a light)? This could be the difference. You should test locally with a similar theme like the test infra uses.

Flags: needinfo?(richard.marti)

Huh, so that is really something we cannot control? If the users OS theme is different, the test will fail?

Is it a good idea to add such a test?

Is it possible to somehow detect by looking at a DOM attribute (which also triggers the actual icon usage), what theme the user is using, or what icon should be used in the users environment?

Instead of relying on the system theme would it be possible to use the dark and light built-in TB themes? Then there would be a defined environment for the tests and you could also check if the icon changes on theme change. I don't know not enough about the tests. Maybe you could check which icon variable is set on the button.

When I change my Linux System Theme from Standard to Light, then it behaves like our test infra.

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/596baaaf3374
Adjust composeAction test to the light Linux theme used by CI. r=darktrojan
You need to log in before you can comment on or make changes to this bug.