Closed Bug 885583 Opened 12 years ago Closed 12 years ago

Convert web audio tests to PushPrefEnv

Categories

(Core :: Web Audio, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla24

People

(Reporter: rillian, Assigned: ehsan.akhgari)

References

Details

Attachments

(1 file, 2 obsolete files)

According to Ted, SpecialPowers.setBoolPref() doesn't work on B2G, because preference setting is async there. Instead we must use pushPrefEnv(), which takes a callback to execute in the altered preference environment. I worry that we've seen no problems with that because webaudio is enabled by default in nightly, and that ff24 will suddenly break B2G mochitests if/when we flip the pref.
Attached patch Example fix (obsolete) — Splinter Review
Here's an example of what the async test api looks like, borrowed from the WebVTT tests in bug 833386. If we like this I'm happy to do the mechanical conversion of the remaining tests.
Assignee: nobody → giles
Attachment #765676 - Flags: review?(ehsan)
Attached patch Example fix (obsolete) — Splinter Review
Oops. Set the correct pref!
Attachment #765676 - Attachment is obsolete: true
Attachment #765676 - Flags: review?(ehsan)
Attachment #765686 - Flags: review?(ehsan)
Comment on attachment 765686 [details] [diff] [review] Example fix Review of attachment 765686 [details] [diff] [review]: ----------------------------------------------------------------- Hmm, shoot! So let's take this patch for now, but please file a follow-up to fix this properly. I think we should just add this pref to the mochitest profiles, and remove it from everywhere that we set/unset it manually. There is no reason why we should ever disable Web Audio in mochitests.
Attachment #765686 - Flags: review?(ehsan) → review+
Pushed a pref flip to try to see how obvious this problem is. https://tbpl.mozilla.org/?tree=Try&rev=cf697584c88b
Summary: Covert web audio tests to PushPrefEnv → Convert web audio tests to PushPrefEnv
You changed browser/app/profile/firefox.js. That's not going to affect b2g.
Good catch. Is b2g running the webaudio tests at all? I don't seem them in the mochitest logs from this push. Presumedly firefox os uses b2g/app/b2g.js and so webaudio is already default-disabled there?
Pushed https://tbpl.mozilla.org/?tree=Try&rev=c0d551eddedb to at least verify the android side.
Attempt to enable webaudio tests on b2g with the pref disabled. https://tbpl.mozilla.org/?tree=Try&rev=dcc5789ba017
11:08:03 INFO - 34561 ERROR TEST-UNEXPECTED-FAIL | /tests/content/media/webaudio/test/test_AudioBuffer.html | uncaught exception - ReferenceError: AudioContext is not defined at http://mochi.test:8888/tests/content/media/webaudio/test/test_AudioBuffer.html:16 So we do have an issue with setBoolPref.
Blocks: 886168
Attached patch Patch (v1)Splinter Review
OK, this patch enables Web Audio on all mochitests, and makes us not need setBoolPref at all.
Assignee: giles → ehsan
Status: NEW → ASSIGNED
Attachment #766492 - Flags: review?(roc)
Attachment #765686 - Attachment is obsolete: true
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: