Closed Bug 1061671 Opened 10 years ago Closed 10 years ago

Intermittent test_content_integration.html | spoken: ["wow",{"string":"headingLevel","args":[1]},"such app"] expected: ["Back",{"string":"pushbutton"}] after: {"name":"AccessFu:MoveCursor","json":{"action":"moveNext","rule":"Simple","inputType":"gesture",

Categories

(Core :: Disability Access APIs, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla35
Tracking Status
firefox33 --- unaffected
firefox34 --- fixed
firefox35 --- fixed
firefox-esr31 --- unaffected

People

(Reporter: cbook, Assigned: eeejay)

References

()

Details

(Keywords: intermittent-failure)

Attachments

(2 files, 1 obsolete file)

Ubuntu VM 12.04 fx-team debug test mochitest-other on 2014-09-02 00:30:52 PDT for push c360f3d1c00d

slave: tst-linux32-spot-442

https://tbpl.mozilla.org/php/getParsedLog.php?id=47205313&tree=Fx-Team

198 INFO TEST-UNEXPECTED-FAIL | chrome://mochitests/content/a11y/accessible/tests/mochitest/jsat/test_content_integration.html | spoken: ["wow",{"string":"headingLevel","args":[1]},"such app"] expected: ["Back",{"string":"pushbutton"}] after: {"name":"AccessFu:MoveCursor","json":{"action":"moveNext","rule":"Simple","inputType":"gesture","origin":"top"}} -     Structures begin differing at:
Anybody have cycles to look into this frequent failure?
Flags: needinfo?(trev.saunders)
Flags: needinfo?(surkov.alexander)
Flags: needinfo?(mzehe)
Yura, can you take a look please?
Flags: needinfo?(yzenevich)
Flags: needinfo?(trev.saunders)
Flags: needinfo?(surkov.alexander)
Flags: needinfo?(mzehe)
CC'ing Eitan as he has a patch coming up with stability improvements to the tests.
Flags: needinfo?(yzenevich)
I think I figured out what is failing. The test document is not out of busy state before we start the test. I'll incorporate the changes into bug 1067509.
Actually, there is already an r+ for that patch. I'll propose something here and land them on inbound together.
Attachment #8492413 - Flags: review?(yzenevich)
Comment on attachment 8492413 [details] [diff] [review]
Wait for document load complete before starting jsat content tests.

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

looks good, thanks!
Attachment #8492413 - Flags: review?(yzenevich) → review+
So this is still happening on m-i. From the logs it looks like this happens when the frame document still has a state of BUSY when we start. We need to wait for it to always be in a loaded state to have a consistent run.
Attachment #8494013 - Flags: review?(yzenevich)
Comment on attachment 8494013 [details] [diff] [review]
Wait for frame content to load before starting test.

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

Let me know what you think about the alternative.

::: accessible/jsat/content-script.js
@@ +144,5 @@
>      eventManager.inTest = m.json.inTest;
>      eventManager.start();
>  
> +    function contentStarted() {
> +      if (m.json.inTest) {

AFAIK we only use 'AccessFu:ContentStarted' message in test. If so we can test for m.json.inTest before contentStarted is called.

@@ +148,5 @@
> +      if (m.json.inTest) {
> +        // During a test we want to wait for the document to finish loading for
> +        // consistency. In real life, we want start as soon as possible.
> +        let accDoc = Utils.AccRetrieval.getAccessibleFor(content.document);
> +        if (!accDoc || Utils.getState(accDoc).contains(States.BUSY)) {

Perhaps, instead of relying on continuous timeouts in content-script.js, we could update the EventManager's listener for the STATE_CHANGE event and check when inTest if event's accessible is our doc and that it does not contain a BUSY state (and then send a message from there)? 

// Something like this:
// state.contains(States.BUSY) && 
// event.accessible === event.accessibleDocument && 
// !event.isEnabled
Attachment #8494013 - Flags: review?(yzenevich)
Attachment #8494013 - Attachment is obsolete: true
Attachment #8496973 - Flags: review?(yzenevich)
Comment on attachment 8496973 [details] [diff] [review]
Wait for frame content to load before starting test.

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

r=me thanks
Attachment #8496973 - Flags: review?(yzenevich) → review+
https://hg.mozilla.org/mozilla-central/rev/355d3c412278
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: