mochitest-a11y failed, summary reports unexpected huge numbers for pass/fail. ("gA11yEventListeners is undefined")

RESOLVED WONTFIX

Status

Testing
Mochitest
--
major
RESOLVED WONTFIX
6 years ago
3 months ago

People

(Reporter: sgautherie, Unassigned)

Tracking

(Blocks: 3 bugs, {helpwanted})

Trunk
helpwanted
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox11 affected)

Details

(URL)

Attachments

(2 attachments)

(Reporter)

Description

6 years ago
Very similar to what bug 492956 used to be,
except the error (now reported through bug 652494) is (a little) different:
{
[...] ERROR TEST-UNEXPECTED-FAIL | chrome://mochitests/content/a11y/accessible/[...] | an unexpected uncaught JS exception reported through window.onerror - gA11yEventListeners is undefined at chrome://mochitests/content/a11y/accessible/events.js:1438
}

***** Code reminder:

http://mxr.mozilla.org/mozilla-central/search?string=gA11yEventListeners&case=1&find=%2Faccessible%2F.*%2Fevents\.js%24
{
/accessible/tests/mochitest/events.js
    * line 1412 -- var gA11yEventListeners = {};
    * line 1438 -- var listenersArray = gA11yEventListeners[event.eventType];
    * line 1501 -- if (!(aEventType in gA11yEventListeners))
    * line 1502 -- gA11yEventListeners[aEventType] = new Array();
    * line 1504 -- var listenersArray = gA11yEventListeners[aEventType];
    * line 1512 -- var listenersArray = gA11yEventListeners[aEventType];
    * line 1523 -- gA11yEventListeners[aEventType] = null;
    * line 1524 -- delete gA11yEventListeners[aEventType];
}

gA11yEventListeners should be defined everywhere:
it's a calling context issue (due to executeSoon()/setTimeout()/events/...).

No different than bug 492956 case, as I already wrote :-<
(Reporter)

Updated

6 years ago
Blocks: 652494
No longer depends on: 652494
(Reporter)

Comment 1

6 years ago
Created attachment 588695 [details] [diff] [review]
(Bv1) accessible/tests/mochitest/events.js: Use Services.jsm
[Checked in: See comment 6+7]

This won't help with this bug, but it updates/simplifies code I fixed in bug 492956.
Attachment #588695 - Flags: review?(surkov.alexander)
(Reporter)

Comment 2

6 years ago
(In reply to Serge Gautherie (:sgautherie) from comment #0)
> it's a calling context issue (due to executeSoon()/setTimeout()/events/...).

I tried a few tweaks, but without success.

In bug 492956, I moved observerService into gA11yEventObserver...
Here, I tried moving gA11yEventListeners into gA11yEventObserver too, fwiw:
that works but it then complains about 'gLogger'... ;-<

I would guess at a bad interaction between TestRunner.js and events.js. (but is it avoidable?)
Keywords: helpwanted
(Reporter)

Comment 3

6 years ago
Created attachment 588746 [details] [diff] [review]
(Cv1) accessible/tests/mochitest/events.js: Call SimpleTest.finish() from SimpleTest.executeSoon()

This is not required (and will not fix this bug), but it helps isolate tests from one another, just in case.

Succeeded as:
https://tbpl.mozilla.org/?tree=Try&rev=df396ec55c88
Attachment #588746 - Flags: review?(surkov.alexander)

Comment 4

6 years ago
Comment on attachment 588695 [details] [diff] [review]
(Bv1) accessible/tests/mochitest/events.js: Use Services.jsm
[Checked in: See comment 6+7]

Review of attachment 588695 [details] [diff] [review]:
-----------------------------------------------------------------

::: accessible/tests/mochitest/events.js
@@ +1607,1 @@
>    },

do you need to keep trailing comma?
Attachment #588695 - Flags: review?(surkov.alexander) → review+

Comment 5

6 years ago
(In reply to Serge Gautherie (:sgautherie) from comment #3)
> Created attachment 588746 [details] [diff] [review]
> (Cv1) accessible/tests/mochitest/events.js: Call SimpleTest.finish() from
> SimpleTest.executeSoon()
> 
> This is not required (and will not fix this bug), but it helps isolate tests
> from one another, just in case.

what's benefits of tests isolation?

Updated

6 years ago
Blocks: 417472
(Reporter)

Comment 6

6 years ago
Comment on attachment 588695 [details] [diff] [review]
(Bv1) accessible/tests/mochitest/events.js: Use Services.jsm
[Checked in: See comment 6+7]

https://hg.mozilla.org/mozilla-central/rev/6af8c11d727a
Attachment #588695 - Attachment description: (Bv1) accessible/tests/mochitest/events.js: Use Services.jsm → (Bv1) accessible/tests/mochitest/events.js: Use Services.jsm [Checked in: Comment 6]
(Reporter)

Updated

6 years ago
Attachment #588695 - Attachment description: (Bv1) accessible/tests/mochitest/events.js: Use Services.jsm [Checked in: Comment 6] → (Bv1) accessible/tests/mochitest/events.js: Use Services.jsm [Checked in: See comment 6]
(Reporter)

Comment 7

6 years ago
Comment on attachment 588695 [details] [diff] [review]
(Bv1) accessible/tests/mochitest/events.js: Use Services.jsm
[Checked in: See comment 6+7]

(In reply to alexander :surkov from comment #4)
> do you need to keep trailing comma?

https://hg.mozilla.org/mozilla-central/rev/7edc6c4cf83d
(Bv1a-bis) accessible/tests/mochitest/events.js: Fix typo in patch Bv1a.
Attachment #588695 - Attachment description: (Bv1) accessible/tests/mochitest/events.js: Use Services.jsm [Checked in: See comment 6] → (Bv1) accessible/tests/mochitest/events.js: Use Services.jsm [Checked in: See comment 6+7]

Comment 8

6 years ago
Comment on attachment 588746 [details] [diff] [review]
(Cv1) accessible/tests/mochitest/events.js: Call SimpleTest.finish() from SimpleTest.executeSoon()

canceling review until comment #5 is addressed
Attachment #588746 - Flags: review?(surkov.alexander)
Sad to see this stall.

Serge can you clarify regarding test isolation?
Mass closing mochitest bugs that haven't had activity in the past 5 years. Please re-open or file a new bug with modern context if this is still relevant.
Status: NEW → RESOLVED
Last Resolved: 3 months ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.