Closed Bug 1843694 Opened 1 year ago Closed 1 year ago

Intermittent accessible/tests/mochitest/textattrs/test_mathml.html | Wrong end offset for mi at offset 0 - got 2, expected 1

Categories

(Core :: Disability Access APIs, defect, P5)

defect

Tracking

()

VERIFIED FIXED
117 Branch
Tracking Status
firefox-esr102 --- unaffected
firefox-esr115 --- unaffected
firefox115 --- unaffected
firefox116 --- unaffected
firefox117 --- verified

People

(Reporter: intermittent-bug-filer, Assigned: fredw)

References

(Regression)

Details

(Keywords: intermittent-failure, intermittent-testcase, regression)

Attachments

(1 file)

Filed by: ncsoregi [at] mozilla.com
Parsed log: https://treeherder.mozilla.org/logviewer?job_id=422743541&repo=try
Full log: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/B6huDWs0RvyZ92_e67IIiw/runs/0/artifacts/public/logs/live_backing.log


[task 2023-07-15T11:28:32.222Z] 11:28:32     INFO - TEST-PASS | accessible/tests/mochitest/textattrs/test_mathml.html | Wrong start offset for mi at offset 0 
[task 2023-07-15T11:28:32.222Z] 11:28:32     INFO - Buffered messages finished
[task 2023-07-15T11:28:32.224Z] 11:28:32     INFO - TEST-UNEXPECTED-FAIL | accessible/tests/mochitest/textattrs/test_mathml.html | Wrong end offset for mi at offset 0 - got 2, expected 1
[task 2023-07-15T11:28:32.225Z] 11:28:32     INFO - SimpleTest.is@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:507:14
[task 2023-07-15T11:28:32.225Z] 11:28:32     INFO - testTextAttrs@chrome://mochitests/content/a11y/accessible/tests/mochitest/attributes.js:203:5
[task 2023-07-15T11:28:32.226Z] 11:28:32     INFO - doTest@chrome://mochitests/content/a11y/accessible/tests/mochitest/textattrs/test_mathml.html:21:22
[task 2023-07-15T11:28:32.226Z] 11:28:32     INFO - setTimeout handler*SimpleTest_setTimeoutShim@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:920:41
[task 2023-07-15T11:28:32.227Z] 11:28:32     INFO - addA11yLoadEvent/waitForDocLoad/<@chrome://mochitests/content/a11y/accessible/tests/mochitest/common.js:179:14
[task 2023-07-15T11:28:32.227Z] 11:28:32     INFO - setTimeout handler*SimpleTest_setTimeoutShim@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:920:41
[task 2023-07-15T11:28:32.228Z] 11:28:32     INFO - waitForDocLoad@chrome://mochitests/content/a11y/accessible/tests/mochitest/common.js:169:12
[task 2023-07-15T11:28:32.228Z] 11:28:32     INFO - SimpleTest.waitForFocus/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:1056:13
[task 2023-07-15T11:28:32.229Z] 11:28:32     INFO - TEST-PASS | accessible/tests/mochitest/textattrs/test_mathml.html |  for mi at offset 0 

Frédéric, this intermittent appeared on today's beta simulation and it seems to be related to Bug 1821980.

Do you have time to look into this?
Thank you.

Flags: needinfo?(fwang)

Will look into it later, but I believe the mochitest need explicitly enable mathml_legacy_mathvariant_attribute_disabled

Flags: needinfo?(fwang)
Duplicate of this bug: 1843761

OK so I stand corrected. test_mathml.html already explicitly sets mathml.legacy_mathvariant_attribute.disabled to true, so it should not behave differently on beta. I tried to reproduce locally by disabling the flag in StaticPrefList.yaml but that does not work indeed.

Also the failing test reported in the log here and in bug 1843761 is for

<mi id="mi" mathvariant="normal">x</mi>

In this failing run, it behaves the same as <mi id="mi_italic">x</mi> (which defaults to text-transform: math-auto and so transforms x to surrogate pair for the italic x, so the calculated end offset is 2) but it should really take into account the mathvariant="normal" attribute (which applies text-transform: none, so the character x is not transformed and the expected end offset should be 1).

@emilio @james: I'm not sure why mathvariant="normal" is ignored. I see that the flag is enabled first, then addA11yLoadEvent will do setTimeout(runTest, 0) after focus & page load. Is it possible that there is a problem in the order of flag enabling, attribute mapping, style resolution and a11y tree building? Maybe forcing a reflow would help?

@Natalia @Narcis: If we can't find an easy solution, I'd recommend disabling the test in a11y.ini for now.

Flags: needinfo?(jteh)
Flags: needinfo?(emilio)

I think the issue is that pushPrefEnv is async, so whether the test works relies on whether the pref has been applied before the mathvariant attribute is parsed.

If you add the pref here instead, like here, does it work?

Flags: needinfo?(emilio) → needinfo?(fwang)

OK, I didn't know it was possible to use a prefs (or I forgot, at least it's not in https://firefox-source-docs.mozilla.org/build/buildsystem/test_manifests.html#recognized-metadata). OK I think that makes sense (attribute parsed before the pref enabled), I'll give a try.

Flags: needinfo?(fwang)

OK I uploaded https://phabricator.services.mozilla.com/D183722 which seems to work locally. However, I had to tweak testing/mochitest/runtests.py so let's see if that does not cause any issue: https://treeherder.mozilla.org/jobs?repo=try&revision=c91949d6ecfe5044c9b9fba5a4a5173504fc788d

Attachment #9344159 - Attachment description: WIP: Default a11y mochitest to runByManifest and set test_mathml pref in manifest. Bug 1843694, r=emilio → Bug 1843694 Default a11y mochitest to runByManifest and set test_mathml pref in manifest. r=emilio
Assignee: nobody → fwang
Status: NEW → ASSIGNED

Patch seems to work in today's beta-simulation

Pushed by fred.wang@free.fr: https://hg.mozilla.org/integration/autoland/rev/00d95f017327 Default a11y mochitest to runByManifest and set test_mathml pref in manifest. r=emilio,ahal
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 117 Branch

Fix verified in today's central as early beta simulation.

Status: RESOLVED → VERIFIED
Flags: needinfo?(jteh)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: