Closed Bug 870167 Opened 7 years ago Closed 7 years ago

Create a mini test framework for Web Audio

Categories

(Core :: Web Audio, defect)

x86
macOS
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla23

People

(Reporter: ehsan, Assigned: ehsan)

References

Details

Attachments

(2 files)

This is long overdue.  My goals are to stop repeating the same code over and over again, make it easier to add new tests, and make it very easy to run most of our tests work with OfflineAudioContext when I finish implementing that.  As a bonus, this might open up a path for us to run these tests stand-alone in Chrome, but I don't wanna hold this up on that for now.
Attached patch diff -wSplinter Review
This should be easier to review.
Attachment #747208 - Flags: review?(roc)
Attached patch Patch (v1)Splinter Review
The patch itself.
(In reply to :Ehsan Akhgari (needinfo? me!) from comment #3)
> https://hg.mozilla.org/integration/mozilla-inbound/rev/202d4048a8b8

Ah, wrong bug.  Too many tabs open. :(
Comment on attachment 747209 [details] [diff] [review]
Patch (v1)

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

This is really nice!

r+ with or without that change.

::: content/media/webaudio/test/webaudio.js
@@ +74,5 @@
> + *                everything needed in order to set up the Web Audio graph.
> + *                In async mode, it takes a callback which should be called
> + *                with an argument set to the node to be inspected when the
> + *                callee is ready to proceed with the test.  In sync mode, it
> + *                returns the node to be inspected.

I think it would be a bit cleaner to have createGraph and createGraphAsync and call the former if it exists, otherwise the latter. Right now you're overloading createGraph with two different kinds of things.
Attachment #747209 - Flags: review+
Attachment #747208 - Flags: review?(roc)
https://hg.mozilla.org/mozilla-central/rev/5d965d473897
Status: NEW → RESOLVED
Closed: 7 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
Mass moving Web Audio bugs to the Web Audio component.  Filter on duckityduck.
Component: Video/Audio → Web Audio
You need to log in before you can comment on or make changes to this bug.