content/media/webspeech/test/head.js: Unexpected events cause tests to be run in parallel

RESOLVED FIXED in mozilla23

Status

()

RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: ggp, Assigned: ggp)

Tracking

unspecified
mozilla23
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
The test harness for speech recognition has a callback for when the test is done, which is sometimes used to perform other tests sequentially.

When a test fails for receiving an unexpected DOM event, this callback gets called twice: once when the failure is detected, and once when all other (expected) events are received. This causes different tests to be launched in parallel, and to interfere with each other.
(Assignee)

Comment 1

6 years ago
Created attachment 739720 [details] [diff] [review]
Bug 863813: Only call the done function once per test, failure or success
Attachment #739720 - Flags: review?(bugs)

Comment 2

6 years ago
Comment on attachment 739720 [details] [diff] [review]
Bug 863813: Only call the done function once per test, failure or success

Couldn't you set isDone inside doneFunc and actually there return early if
it has been called already.
Attachment #739720 - Flags: review?(bugs) → review+
Comment on attachment 739720 [details] [diff] [review]
Bug 863813: Only call the done function once per test, failure or success

https://hg.mozilla.org/integration/mozilla-inbound/rev/c0b61756db38
Attachment #739720 - Flags: checkin+
https://hg.mozilla.org/mozilla-central/rev/c0b61756db38
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
You need to log in before you can comment on or make changes to this bug.