Bug 885583 - Enable Web Audio unconditionally across mochitests; r=roc
authorEhsan Akhgari <ehsan@mozilla.com>
Sun, 23 Jun 2013 19:23:02 -0400
changeset 147696 aef71cf41cecf4c3d7bef313bff502c98d5883ce
parent 147695 8f626724b60048edcb7c8a8b0ceef9a7077a1d42
child 147701 85ec41d58705298b5f2ca66e120d36927f462337
push id2697
push userbbajaj@mozilla.com
push dateMon, 05 Aug 2013 18:49:53 +0000
treeherdermozilla-beta@dfec938c7b63 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs885583
milestone24.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 885583 - Enable Web Audio unconditionally across mochitests; r=roc
content/media/webaudio/test/test_AudioBuffer.html
content/media/webaudio/test/test_AudioContext.html
content/media/webaudio/test/test_AudioListener.html
content/media/webaudio/test/test_AudioParam.html
content/media/webaudio/test/test_OfflineAudioContext.html
content/media/webaudio/test/test_analyserNode.html
content/media/webaudio/test/test_audioBufferSourceNodeEnded.html
content/media/webaudio/test/test_badConnect.html
content/media/webaudio/test/test_biquadFilterNode.html
content/media/webaudio/test/test_bug808374.html
content/media/webaudio/test/test_bug827541.html
content/media/webaudio/test/test_bug839753.html
content/media/webaudio/test/test_bug845960.html
content/media/webaudio/test/test_bug856771.html
content/media/webaudio/test/test_bug866570.html
content/media/webaudio/test/test_bug866737.html
content/media/webaudio/test/test_bug867089.html
content/media/webaudio/test/test_bug867104.html
content/media/webaudio/test/test_bug867174.html
content/media/webaudio/test/test_bug867203.html
content/media/webaudio/test/test_bug875221.html
content/media/webaudio/test/test_bug875402.html
content/media/webaudio/test/test_channelSplitterNode.html
content/media/webaudio/test/test_channelSplitterNodeWithVolume.html
content/media/webaudio/test/test_convolverNode.html
content/media/webaudio/test/test_convolverNode_mono_mono.html
content/media/webaudio/test/test_currentTime.html
content/media/webaudio/test/test_dynamicsCompressorNode.html
content/media/webaudio/test/test_maxChannelCount.html
content/media/webaudio/test/test_mediaDecoding.html
content/media/webaudio/test/test_mediaStreamAudioDestinationNode.html
content/media/webaudio/test/test_mixingRules.html
content/media/webaudio/test/test_offlineDestinationChannelCountLess.html
content/media/webaudio/test/test_offlineDestinationChannelCountMore.html
content/media/webaudio/test/test_pannerNode.html
content/media/webaudio/test/test_pannerNode_equalPower.html
content/media/webaudio/test/test_periodicWave.html
content/media/webaudio/test/test_scriptProcessorNode.html
content/media/webaudio/test/test_scriptProcessorNodeChannelCount.html
content/media/webaudio/test/test_scriptProcessorNodeZeroInputOutput.html
content/media/webaudio/test/test_singleSourceDest.html
content/media/webaudio/test/webaudio.js
js/xpconnect/tests/chrome/test_paris_weakmap_keys.xul
testing/profiles/prefs_general.js
--- a/content/media/webaudio/test/test_AudioBuffer.html
+++ b/content/media/webaudio/test/test_AudioBuffer.html
@@ -7,17 +7,16 @@
 </head>
 <body>
 <pre id="test">
 <script src="webaudio.js" type="text/javascript"></script>
 <script class="testbody" type="text/javascript">
 
 SimpleTest.waitForExplicitFinish();
 addLoadEvent(function() {
-  SpecialPowers.setBoolPref("media.webaudio.enabled", true);
   var context = new AudioContext();
   var buffer = context.createBuffer(2, 2048, context.sampleRate);
   SpecialPowers.gc(); // Make sure that our channels are accessible after GC
   ok(buffer, "Buffer was allocated successfully");
   is(buffer.sampleRate, context.sampleRate, "Correct sample rate");
   is(buffer.length, 2048, "Correct length");
   ok(Math.abs(buffer.duration - 2048 / context.sampleRate) < 0.0001, "Correct duration");
   is(buffer.numberOfChannels, 2, "Correct number of channels");
@@ -41,16 +40,15 @@ addLoadEvent(function() {
   expectException(function() {
     context.createBuffer(2, 2048, 96001);
   }, DOMException.NOT_SUPPORTED_ERR);
   context.createBuffer(2, 2048, 8000);  // no exception
   context.createBuffer(2, 2048, 96000); // no exception
   expectException(function() {
     context.createBuffer(2, 0, 48000);
   }, DOMException.NOT_SUPPORTED_ERR);
-  SpecialPowers.clearUserPref("media.webaudio.enabled");
   SimpleTest.finish();
 });
 
 </script>
 </pre>
 </body>
 </html>
--- a/content/media/webaudio/test/test_AudioContext.html
+++ b/content/media/webaudio/test/test_AudioContext.html
@@ -6,21 +6,19 @@
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
 </head>
 <body>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
 SimpleTest.waitForExplicitFinish();
 addLoadEvent(function() {
-  SpecialPowers.setBoolPref("media.webaudio.enabled", true);
   var ac = new AudioContext();
   ok(ac, "Create a AudioContext object");
   is(ac.sampleRate, 48000, "Correct sample rate");
   ok(ac instanceof EventTarget, "AudioContexts must be EventTargets");
-  SpecialPowers.clearUserPref("media.webaudio.enabled");
   SimpleTest.finish();
 });
 
 </script>
 </pre>
 </body>
 </html>
--- a/content/media/webaudio/test/test_AudioListener.html
+++ b/content/media/webaudio/test/test_AudioListener.html
@@ -6,32 +6,30 @@
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
 </head>
 <body>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
 SimpleTest.waitForExplicitFinish();
 addLoadEvent(function() {
-  SpecialPowers.setBoolPref("media.webaudio.enabled", true);
   var context = new AudioContext();
   ok("listener" in context, "AudioContext.listener should exist");
   ok(Math.abs(context.listener.dopplerFactor - 1.0) < 1e-4, "Correct default doppler factor");
   ok(Math.abs(context.listener.speedOfSound - 343.3) < 1e-4, "Correct default speed of sound value");
   context.listener.dopplerFactor = 0.5;
   ok(Math.abs(context.listener.dopplerFactor - 0.5) < 1e-4, "The doppler factor value can be changed");
   context.listener.speedOfSound = 400;
   ok(Math.abs(context.listener.speedOfSound - 400) < 1e-4, "The speed of sound can be changed");
   // The values set by the following cannot be read from script, but the
   // implementation is simple enough, so we just make sure that nothing throws.
   with (context.listener) {
     setPosition(1.0, 1.0, 1.0);
     setOrientation(1.0, 1.0, 1.0, 1.0, 1.0, 1.0);
     setVelocity(0.5, 1.0, 1.5);
   }
-  SpecialPowers.clearUserPref("media.webaudio.enabled");
   SimpleTest.finish();
 });
 
 </script>
 </pre>
 </body>
 </html>
--- a/content/media/webaudio/test/test_AudioParam.html
+++ b/content/media/webaudio/test/test_AudioParam.html
@@ -5,18 +5,16 @@
   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <script type="text/javascript" src="webaudio.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
 </head>
 <body>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
-SpecialPowers.setBoolPref("media.webaudio.enabled", true);
-
 var context = new AudioContext();
 var gain = context.createGain().gain;
 
 ok("value" in gain, "The value attr must exist");
 gain.value = 0.5;
 ok("defaultValue" in gain, "The defaultValue attr must exist");
 (function() {
   "use strict"; // in order to get the readOnly setter to throw
@@ -27,14 +25,12 @@ ok("defaultValue" in gain, "The defaultV
 
 gain.setValueAtTime(1, 0.25);
 gain.linearRampToValueAtTime(0.75, 0.5);
 gain.exponentialRampToValueAtTime(0.1, 0.75);
 gain.setTargetAtTime(0.2, 1, 0.5);
 gain.setTargetValueAtTime(0.3, 1.25, 0.5);
 gain.cancelScheduledValues(1.5);
 
-SpecialPowers.clearUserPref("media.webaudio.enabled");
-
 </script>
 </pre>
 </body>
 </html>
--- a/content/media/webaudio/test/test_OfflineAudioContext.html
+++ b/content/media/webaudio/test/test_OfflineAudioContext.html
@@ -7,17 +7,16 @@
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
 </head>
 <body>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
 SimpleTest.waitForExplicitFinish();
 addLoadEvent(function() {
-  SpecialPowers.setBoolPref("media.webaudio.enabled", true);
   var ctx = new OfflineAudioContext(2, 100, 22050);
   ok(ctx instanceof EventTarget, "OfflineAudioContexts must be EventTargets");
 
   var buf = ctx.createBuffer(2, 100, ctx.sampleRate);
   for (var i = 0; i < 2; ++i) {
     for (var j = 0; j < 100; ++j) {
       buf.getChannelData(i)[j] = Math.sin(2 * Math.PI * 200 * j / ctx.sampleRate);
     }
@@ -46,17 +45,16 @@ addLoadEvent(function() {
   src.connect(ctx.destination);
   ctx.startRendering();
   ctx.addEventListener("complete", function(e) {
     ok(e instanceof OfflineAudioCompletionEvent, "Correct event received");
     is(e.renderedBuffer.numberOfChannels, 2, "Correct expected number of buffers");
     compareBuffers(e.renderedBuffer.getChannelData(0), buf.getChannelData(0));
     compareBuffers(e.renderedBuffer.getChannelData(1), buf.getChannelData(1));
 
-    SpecialPowers.clearUserPref("media.webaudio.enabled");
     SimpleTest.finish();
   }, false);
 });
 
 </script>
 </pre>
 </body>
 </html>
--- a/content/media/webaudio/test/test_analyserNode.html
+++ b/content/media/webaudio/test/test_analyserNode.html
@@ -7,17 +7,16 @@
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
 </head>
 <body>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
 SimpleTest.waitForExplicitFinish();
 addLoadEvent(function() {
-  SpecialPowers.setBoolPref("media.webaudio.enabled", true);
 
   var context = new AudioContext();
   var buffer = context.createBuffer(1, 2048, context.sampleRate);
   for (var i = 0; i < 2048; ++i) {
     buffer.getChannelData(0)[i] = Math.sin(440 * 2 * Math.PI * i / context.sampleRate);
   }
 
   var destination = context.destination;
@@ -78,16 +77,15 @@ addLoadEvent(function() {
     analyser.smoothingTimeConstant = -0.1;
   }, DOMException.INDEX_SIZE_ERR);
   expectException(function() {
     analyser.smoothingTimeConstant = 1.1;
   }, DOMException.INDEX_SIZE_ERR);
   analyser.smoothingTimeConstant = 0;
   analyser.smoothingTimeConstant = 1;
 
-  SpecialPowers.clearUserPref("media.webaudio.enabled");
   SimpleTest.finish();
 });
 
 </script>
 </pre>
 </body>
 </html>
--- a/content/media/webaudio/test/test_audioBufferSourceNodeEnded.html
+++ b/content/media/webaudio/test/test_audioBufferSourceNodeEnded.html
@@ -7,29 +7,26 @@
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
 </head>
 <body>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
 SimpleTest.waitForExplicitFinish();
 addLoadEvent(function() {
-  SpecialPowers.setBoolPref("media.webaudio.enabled", true);
-
   var context = new AudioContext();
   var buffer = context.createBuffer(1, 2048, context.sampleRate);
   for (var i = 0; i < 2048; ++i) {
     buffer.getChannelData(0)[i] = Math.sin(440 * 2 * Math.PI * i / context.sampleRate);
   }
 
   var source = context.createBufferSource();
 
   source.onended = function(e) {
     is(e.target, source, "Correct target for the ended event");
-    SpecialPowers.clearUserPref("media.webaudio.enabled");
     SimpleTest.finish();
   };
 
   source.start(0);
   source.buffer = buffer;
   source.connect(context.destination);
 });
 
--- a/content/media/webaudio/test/test_badConnect.html
+++ b/content/media/webaudio/test/test_badConnect.html
@@ -7,18 +7,16 @@
 </head>
 <body>
 <pre id="test">
 <script src="webaudio.js" type="text/javascript"></script>
 <script class="testbody" type="text/javascript">
 
 SimpleTest.waitForExplicitFinish();
 addLoadEvent(function() {
-  SpecialPowers.setBoolPref("media.webaudio.enabled", true);
-
   var context1 = new AudioContext();
   var context2 = new AudioContext();
 
   var destination1 = context1.destination;
   var destination2 = context2.destination;
 
   isnot(destination1, destination2, "Destination nodes should not be the same");
   isnot(destination1.context, destination2.context, "Destination nodes should not have the same context");
@@ -36,16 +34,15 @@ addLoadEvent(function() {
   }, DOMException.SYNTAX_ERR);
 
   source1.connect(destination1);
 
   expectException(function() {
     source1.disconnect(1);
   }, DOMException.INDEX_SIZE_ERR);
 
-  SpecialPowers.clearUserPref("media.webaudio.enabled");
   SimpleTest.finish();
 });
 
 </script>
 </pre>
 </body>
 </html>
--- a/content/media/webaudio/test/test_biquadFilterNode.html
+++ b/content/media/webaudio/test/test_biquadFilterNode.html
@@ -11,18 +11,16 @@
 <script class="testbody" type="text/javascript">
 
 function near(a, b, msg) {
   ok(Math.abs(a - b) < 1e-3, msg);
 }
 
 SimpleTest.waitForExplicitFinish();
 addLoadEvent(function() {
-  SpecialPowers.setBoolPref("media.webaudio.enabled", true);
-
   var context = new AudioContext();
   var buffer = context.createBuffer(1, 2048, context.sampleRate);
   for (var i = 0; i < 2048; ++i) {
     buffer.getChannelData(0)[i] = Math.sin(440 * 2 * Math.PI * i / context.sampleRate);
   }
 
   var destination = context.destination;
 
@@ -63,17 +61,16 @@ addLoadEvent(function() {
   }
 
   source.start(0);
   SimpleTest.executeSoon(function() {
     source.stop(0);
     source.disconnect();
     filter.disconnect();
 
-    SpecialPowers.clearUserPref("media.webaudio.enabled");
     SimpleTest.finish();
   });
 });
 
 </script>
 </pre>
 </body>
 </html>
--- a/content/media/webaudio/test/test_bug808374.html
+++ b/content/media/webaudio/test/test_bug808374.html
@@ -4,18 +4,16 @@
   <title>Crashtest for bug 808374</title>
   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
 </head>
 <body>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
-SpecialPowers.setBoolPref("media.webaudio.enabled", true);
 var ctx = new AudioContext();
 ctx.createBuffer(0, 1, ctx.sampleRate);
 ok(true, "The test should not crash during CC");
-SpecialPowers.clearUserPref("media.webaudio.enabled");
 
 </script>
 </pre>
 </body>
 </html>
--- a/content/media/webaudio/test/test_bug827541.html
+++ b/content/media/webaudio/test/test_bug827541.html
@@ -3,23 +3,20 @@
 <head>
   <title>Tell the cycle collector about the audio contexts owned by nsGlobalWindow</title>
   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
 </head>
 <body>
 <pre id="test">
 <script class="testbody" type="text/javascript">
-  SpecialPowers.setBoolPref("media.webaudio.enabled", true);
-
   var iframe = document.createElementNS("http://www.w3.org/1999/xhtml", "iframe");
   document.body.appendChild(iframe);
   var frameWin = iframe.contentWindow;
   frameWin.AudioContext();
   document.body.removeChild(iframe);
   frameWin.AudioContext();
 
   ok(true, "This test should not leak");
-  SpecialPowers.clearUserPref("media.webaudio.enabled");
 </script>
 </pre>
 </body>
 </html>
--- a/content/media/webaudio/test/test_bug839753.html
+++ b/content/media/webaudio/test/test_bug839753.html
@@ -4,17 +4,15 @@
   <title>Crashtest for bug 839753</title>
   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
 </head>
 <body>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
-SpecialPowers.setBoolPref("media.webaudio.enabled", true);
 AudioContext().destination.expando = null;
 ok(true, "The test should not trigger wrapper cache assertions");
-SpecialPowers.clearUserPref("media.webaudio.enabled");
 
 </script>
 </pre>
 </body>
 </html>
--- a/content/media/webaudio/test/test_bug845960.html
+++ b/content/media/webaudio/test/test_bug845960.html
@@ -4,17 +4,15 @@
   <title>Crashtest for bug 845960</title>
   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
 </head>
 <body>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
-SpecialPowers.setBoolPref("media.webaudio.enabled", true);
 (new AudioContext()).decodeAudioData(new ArrayBuffer(0), function() {});
 ok(true, "Should not crash when the optional failure callback is not specified");
-SpecialPowers.clearUserPref("media.webaudio.enabled");
 
 </script>
 </pre>
 </body>
 </html>
--- a/content/media/webaudio/test/test_bug856771.html
+++ b/content/media/webaudio/test/test_bug856771.html
@@ -6,24 +6,21 @@
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
 </head>
 <body>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
 SimpleTest.waitForExplicitFinish();
 addLoadEvent(function() {
-  SpecialPowers.setBoolPref("media.webaudio.enabled", true);
-
   var context = new AudioContext();
 
   var source = context.createBufferSource();
   source.connect(context.destination);
   ok(true, "Nothing should leak");
 
-  SpecialPowers.clearUserPref("media.webaudio.enabled");
   SimpleTest.finish();
 });
 
 </script>
 </pre>
 </body>
 </html>
--- a/content/media/webaudio/test/test_bug866570.html
+++ b/content/media/webaudio/test/test_bug866570.html
@@ -4,17 +4,15 @@
   <title>Crashtest for bug 859600</title>
   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
 </head>
 <body>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
-SpecialPowers.setBoolPref("media.webaudio.enabled", true);
 AudioContext().foo = null;
 ok(true, "The test should not fatally assert");
-SpecialPowers.clearUserPref("media.webaudio.enabled");
 
 </script>
 </pre>
 </body>
 </html>
--- a/content/media/webaudio/test/test_bug866737.html
+++ b/content/media/webaudio/test/test_bug866737.html
@@ -4,18 +4,16 @@
   <title>Test for bug 866737</title>
   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
 </head>
 <body>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
-SpecialPowers.setBoolPref("media.webaudio.enabled", true);
-
 var context = new AudioContext();
 
 (function() {
   var d = context.createDelay();
   var panner = context.createPanner();
   d.connect(panner);
   var gain = context.createGain();
   panner.connect(gain);
@@ -27,14 +25,12 @@ SpecialPowers.forceGC();
 SpecialPowers.forceCC();
 
 var gain = context.createGain();
 gain.connect(context.destination);
 gain.disconnect(0);
 
 ok(true, "No crashes should happen!");
 
-SpecialPowers.clearUserPref("media.webaudio.enabled");
-
 </script>
 </pre>
 </body>
 </html>
--- a/content/media/webaudio/test/test_bug867089.html
+++ b/content/media/webaudio/test/test_bug867089.html
@@ -4,17 +4,16 @@
   <title>Crashtest for bug 867089</title>
   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
 </head>
 <body>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
-SpecialPowers.setBoolPref("media.webaudio.enabled", true);
 SimpleTest.waitForExplicitFinish();
 addLoadEvent(function() {
   var ctx = new AudioContext();
 
   // Test invalid playbackRate values for AudioBufferSourceNode.
   var source = ctx.createBufferSource();
   var buffer = ctx.createBuffer(2, 2048, 8000);
   source.buffer = buffer;
@@ -29,17 +28,16 @@ addLoadEvent(function() {
   source2.start(0);
 
   var source3 = ctx.createBufferSource();
   source3.buffer = buffer;
   source3.playbackRate.value = 3000000.0;
   source3.connect(ctx.destination);
   source3.start(0);
   ok(true, "We did not crash.");
-  SpecialPowers.clearUserPref("media.webaudio.enabled");
   SimpleTest.finish();
 });
 
 
 </script>
 </pre>
 </body>
 </html>
--- a/content/media/webaudio/test/test_bug867104.html
+++ b/content/media/webaudio/test/test_bug867104.html
@@ -4,32 +4,30 @@
   <title>Crashtest for bug 867104</title>
   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
 </head>
 <body>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
-SpecialPowers.setBoolPref("media.webaudio.enabled", true);
 SimpleTest.waitForExplicitFinish();
 addLoadEvent(function() {
   var ctx = new AudioContext();
   var source = ctx.createBufferSource();
   var b0 = ctx.createBuffer(32,798,22050);
   var b1 = ctx.createBuffer(32,28,22050);
   var sp = ctx.createScriptProcessor();
   source.buffer = b0;
   source.connect(sp);
   source.start(0);
   source.buffer = b1;
   sp.onaudioprocess = function() {
     ok(true, "We did not crash.");
     sp.onaudioprocess = null;
-    SpecialPowers.clearUserPref("media.webaudio.enabled");
     SimpleTest.finish();
   };
 });
 
 
 </script>
 </pre>
 </body>
--- a/content/media/webaudio/test/test_bug867174.html
+++ b/content/media/webaudio/test/test_bug867174.html
@@ -4,17 +4,16 @@
   <title>Crashtest for bug 867174</title>
   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
 </head>
 <body>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
-SpecialPowers.setBoolPref("media.webaudio.enabled", true);
 SimpleTest.waitForExplicitFinish();
 addLoadEvent(function() {
   var ctx = new AudioContext();
 
   var source = ctx.createBufferSource();
   var buffer = ctx.createBuffer(2, 2048, 8000);
   source.playbackRate.setTargetAtTime(0, 2, 3);
   var sp = ctx.createScriptProcessor();
@@ -23,17 +22,16 @@ addLoadEvent(function() {
   source.start(0);
 
   sp.onaudioprocess = function(e) {
     // Now set the buffer
     source.buffer = buffer;
 
     ok(true, "We did not crash.");
     sp.onaudioprocess = null;
-    SpecialPowers.clearUserPref("media.webaudio.enabled");
     SimpleTest.finish();
   };
 });
 
 
 </script>
 </pre>
 </body>
--- a/content/media/webaudio/test/test_bug867203.html
+++ b/content/media/webaudio/test/test_bug867203.html
@@ -4,33 +4,31 @@
   <title>Crashtest for bug 867203</title>
   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
 </head>
 <body>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
-SpecialPowers.setBoolPref("media.webaudio.enabled", true);
 SimpleTest.waitForExplicitFinish();
 addLoadEvent(function() {
   var ctx = new AudioContext();
 
   var panner1 = ctx.createPanner();
   panner1.setVelocity(1, 1, 1);
   ctx.listener.setVelocity(1, 1, 1);
   (function() {
     ctx.createBufferSource().connect(panner1);
   })();
   SpecialPowers.forceGC();
   SpecialPowers.forceCC();
   ctx.createPanner();
 
   ok(true, "We did not crash.");
-  SpecialPowers.clearUserPref("media.webaudio.enabled");
   SimpleTest.finish();
 });
 
 
 </script>
 </pre>
 </body>
 </html>
--- a/content/media/webaudio/test/test_bug875221.html
+++ b/content/media/webaudio/test/test_bug875221.html
@@ -4,17 +4,16 @@
   <title>Crashtest for bug 875221</title>
   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
 </head>
 <body>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
-SpecialPowers.setBoolPref("media.webaudio.enabled", true);
 SimpleTest.waitForExplicitFinish();
 
 try { o0 = document.createElement('audio'); } catch(e) {  }
 try { (document.body || document.documentElement).appendChild(o0); } catch(e) {  }
 try { o1 = new OfflineAudioContext(1, 10, (new AudioContext()).sampleRate); } catch(e) {  }
 try { o1.startRendering(); } catch(e) {  }
 try { o1.listener.dopplerFactor = 1; } catch(e) {  }
 try { o2 = o1.createScriptProcessor(); } catch(e) {  }
@@ -224,17 +223,16 @@ try { o2.connect(o7); } catch(e) {  }
 try { o7.connect(o4); } catch(e) {  }
 try { o2.connect(o7); } catch(e) {  }
 try { o9.connect(o1); } catch(e) {  }
 try { o2.connect(o7); } catch(e) {  }
 try { o7.connect(o4); } catch(e) {  }
 
 function done() {
   ok(true, "We did not crash.");
-  SpecialPowers.clearUserPref("media.webaudio.enabled");
   SimpleTest.finish();
 }
 
 
 </script>
 </pre>
 </body>
 </html>
--- a/content/media/webaudio/test/test_bug875402.html
+++ b/content/media/webaudio/test/test_bug875402.html
@@ -4,17 +4,16 @@
   <title>Crashtest for bug 875402</title>
   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
 </head>
 <body>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
-SpecialPowers.setBoolPref("media.webaudio.enabled", true);
 SimpleTest.waitForExplicitFinish();
 try { o1 = new OfflineAudioContext(1, 10, (new AudioContext()).sampleRate); } catch(e) {  }
 try { o2 = o1.createScriptProcessor(); } catch(e) {  }
 try { o4 = new OfflineAudioContext(1, 10, (new AudioContext()).sampleRate); } catch(e) {  }
 try { o5 = o1.createChannelSplitter(4); } catch(e) {  }
 try { o7 = o4.createScriptProcessor(1024, 4, 1); } catch(e) {  }
 SpecialPowers.forceCC();
 SpecialPowers.forceGC();
@@ -31,16 +30,15 @@ try { o2.connect(o9); } catch(e) {  }
 try { o4.startRendering(); } catch(e) {  }
 try { o2.connect(o9); } catch(e) {  }
 setTimeout("try { o7.connect(o4); } catch(e) {  }",50)
 try { o13 = o4.createGain(); } catch(e) {  }
 setTimeout("try { o7.connect(o13, 0, 0) } catch(e) {  }",50)
 
 function done() {
   ok(true, "We did not crash.");
-  SpecialPowers.clearUserPref("media.webaudio.enabled");
   SimpleTest.finish();
 }
 
 </script>
 </pre>
 </body>
 </html>
--- a/content/media/webaudio/test/test_channelSplitterNode.html
+++ b/content/media/webaudio/test/test_channelSplitterNode.html
@@ -11,18 +11,16 @@
 <script class="testbody" type="text/javascript">
 
 // We do not use our generic graph test framework here because
 // the splitter node is special in that it creates multiple
 // output ports.
 
 SimpleTest.waitForExplicitFinish();
 addLoadEvent(function() {
-  SpecialPowers.setBoolPref("media.webaudio.enabled", true);
-
   var context = new AudioContext();
   var buffer = context.createBuffer(4, 2048, context.sampleRate);
   for (var j = 0; j < 4; ++j) {
     for (var i = 0; i < 2048; ++i) {
       buffer.getChannelData(j)[i] = Math.sin(440 * 2 * (j + 1) * Math.PI * i / context.sampleRate);
     }
   }
   var emptyBuffer = context.createBuffer(1, 2048, context.sampleRate);
@@ -47,17 +45,16 @@ addLoadEvent(function() {
         compareBuffers(e.inputBuffer.getChannelData(0), buffer.getChannelData(i));
       } else {
         compareBuffers(e.inputBuffer.getChannelData(0), emptyBuffer.getChannelData(0));
       }
       e.target.onaudioprocess = null;
       ++channelsSeen;
 
       if (channelsSeen == 6) {
-        SpecialPowers.clearUserPref("media.webaudio.enabled");
         SimpleTest.finish();
       }
     };
   }
 
   for (var i = 0; i < 6; ++i) {
     var sp = context.createScriptProcessor(2048, 1);
     splitter.connect(sp, i);
--- a/content/media/webaudio/test/test_channelSplitterNodeWithVolume.html
+++ b/content/media/webaudio/test/test_channelSplitterNodeWithVolume.html
@@ -11,18 +11,16 @@
 <script class="testbody" type="text/javascript">
 
 // We do not use our generic graph test framework here because
 // the splitter node is special in that it creates multiple
 // output ports.
 
 SimpleTest.waitForExplicitFinish();
 addLoadEvent(function() {
-  SpecialPowers.setBoolPref("media.webaudio.enabled", true);
-
   var context = new AudioContext();
   var buffer = context.createBuffer(4, 2048, context.sampleRate);
   var expectedBuffer = context.createBuffer(4, 2048, context.sampleRate);
   for (var j = 0; j < 4; ++j) {
     for (var i = 0; i < 2048; ++i) {
       buffer.getChannelData(j)[i] = Math.sin(440 * 2 * (j + 1) * Math.PI * i / context.sampleRate);
       expectedBuffer.getChannelData(j)[i] = buffer.getChannelData(j)[i] / 2;
     }
@@ -52,17 +50,16 @@ addLoadEvent(function() {
         compareBuffers(e.inputBuffer.getChannelData(0), expectedBuffer.getChannelData(i));
       } else {
         compareBuffers(e.inputBuffer.getChannelData(0), emptyBuffer.getChannelData(0));
       }
       e.target.onaudioprocess = null;
       ++channelsSeen;
 
       if (channelsSeen == 6) {
-        SpecialPowers.clearUserPref("media.webaudio.enabled");
         SimpleTest.finish();
       }
     };
   }
 
   for (var i = 0; i < 6; ++i) {
     var sp = context.createScriptProcessor(2048, 1);
     splitter.connect(sp, i);
--- a/content/media/webaudio/test/test_convolverNode.html
+++ b/content/media/webaudio/test/test_convolverNode.html
@@ -7,29 +7,26 @@
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
 </head>
 <body>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
 SimpleTest.waitForExplicitFinish();
 addLoadEvent(function() {
-  SpecialPowers.setBoolPref("media.webaudio.enabled", true);
-
   var context = new AudioContext();
   var conv = context.createConvolver();
 
   is(conv.channelCount, 2, "Convolver node has 2 input channels by default");
   is(conv.channelCountMode, "clamped-max", "Correct channelCountMode for the Convolver node");
   is(conv.channelInterpretation, "speakers", "Correct channelCountInterpretation for the Convolver node");
 
   is(conv.buffer, null, "Default buffer value");
   conv.buffer = context.createBuffer(2, 1024, 22050);
   is(conv.normalize, true, "Default normalize value");
 
-  SpecialPowers.clearUserPref("media.webaudio.enabled");
   SimpleTest.finish();
 });
 
 </script>
 </pre>
 </body>
 </html>
--- a/content/media/webaudio/test/test_convolverNode_mono_mono.html
+++ b/content/media/webaudio/test/test_convolverNode_mono_mono.html
@@ -25,18 +25,16 @@ SimpleTest.waitForExplicitFinish();
 // part of the result is zero (due to the latency in the convolver).
 // Next, the triangular pulse should match the theoretical result to
 // within some roundoff.  After the triangular pulse, the result
 // should be exactly zero, but round-off prevents that.  We make sure
 // the part after the pulse is sufficiently close to zero.  Finally,
 // the result should be exactly zero because the inputs are exactly
 // zero.
 function runTest() {
-    SpecialPowers.setBoolPref("media.webaudio.enabled", true);
-
     if (window.testRunner) {
         testRunner.dumpAsText();
         testRunner.waitUntilDone();
     }
 
     window.jsTestIsAsync = true;
 
     // Create offline audio context.
@@ -57,17 +55,16 @@ function runTest() {
 
     bufferSource.start(0);
 
     context.oncomplete = checkConvolvedResult(trianglePulse);
     context.startRendering();
 }
 
 function finishJSTest() {
-  SpecialPowers.clearUserPref("media.webaudio.enabled");
   SimpleTest.finish();
 }
 
 runTest();
 successfullyParsed = true;
 
 </script>
 
--- a/content/media/webaudio/test/test_currentTime.html
+++ b/content/media/webaudio/test/test_currentTime.html
@@ -6,22 +6,20 @@
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
 </head>
 <body>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
 SimpleTest.waitForExplicitFinish();
 addLoadEvent(function() {
-  SpecialPowers.setBoolPref("media.webaudio.enabled", true);
   var ac = new AudioContext();
   is(ac.currentTime, 0, "AudioContext.currentTime should be 0 initially");
   setTimeout(function() {
     ok(ac.currentTime > 0, "AudioContext.currentTime should have increased by now");
-    SpecialPowers.clearUserPref("media.webaudio.enabled");
     SimpleTest.finish();
   }, 1000);
 });
 
 </script>
 </pre>
 </body>
 </html>
--- a/content/media/webaudio/test/test_dynamicsCompressorNode.html
+++ b/content/media/webaudio/test/test_dynamicsCompressorNode.html
@@ -10,18 +10,16 @@
 <script class="testbody" type="text/javascript">
 
 function near(a, b, msg) {
   ok(Math.abs(a - b) < 1e-4, msg);
 }
 
 SimpleTest.waitForExplicitFinish();
 addLoadEvent(function() {
-  SpecialPowers.setBoolPref("media.webaudio.enabled", true);
-
   var context = new AudioContext();
   var buffer = context.createBuffer(1, 2048, context.sampleRate);
   for (var i = 0; i < 2048; ++i) {
     buffer.getChannelData(0)[i] = Math.sin(440 * 2 * Math.PI * i / context.sampleRate);
   }
 
   var destination = context.destination;
 
@@ -49,17 +47,16 @@ addLoadEvent(function() {
   }
 
   source.start(0);
   SimpleTest.executeSoon(function() {
     source.stop(0);
     source.disconnect();
     compressor.disconnect();
 
-    SpecialPowers.clearUserPref("media.webaudio.enabled");
     SimpleTest.finish();
   });
 });
 
 </script>
 </pre>
 </body>
 </html>
--- a/content/media/webaudio/test/test_maxChannelCount.html
+++ b/content/media/webaudio/test/test_maxChannelCount.html
@@ -7,31 +7,28 @@
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
 </head>
 <body>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
 SimpleTest.waitForExplicitFinish();
 addLoadEvent(function() {
-  SpecialPowers.setBoolPref("media.webaudio.enabled", true);
-
   var ac = new AudioContext();
   ok(ac.destination.maxChannelCount > 0, "We can query the maximum number of channels");
 
   var oac = new OfflineAudioContext(2, 1024, 48000);
   ok(oac.destination.maxChannelCount, 2, "This OfflineAudioContext should have 2 max channels.");
 
   oac = new OfflineAudioContext(6, 1024, 48000);
   ok(oac.destination.maxChannelCount, 6, "This OfflineAudioContext should have 6 max channels.");
 
   expectException(function() {
     oac.destination.channelCount = oac.destination.channelCount + 1;
   }, DOMException.INDEX_SIZE_ERR);
 
-  SpecialPowers.clearUserPref("media.webaudio.enabled");
   SimpleTest.finish();
 });
 
 </script>
 </pre>
 </body>
 </html>
--- a/content/media/webaudio/test/test_mediaDecoding.html
+++ b/content/media/webaudio/test/test_mediaDecoding.html
@@ -265,22 +265,20 @@ function runTest(test, callback) {
   };
   xhr.send();
 }
 
 function runNextTest() {
   if (tests.length) {
     runTest(tests.shift(), runNextTest);
   } else {
-    SpecialPowers.clearUserPref("media.webaudio.enabled");
     SimpleTest.finish();
   }
 }
 
-SpecialPowers.setBoolPref("media.webaudio.enabled", true);
 SimpleTest.waitForExplicitFinish();
 
 var cx = new AudioContext();
 
 // Run some simple tests first
 function callbackShouldNeverRun() {
   ok(false, "callback should not fire");
 }
--- a/content/media/webaudio/test/test_mediaStreamAudioDestinationNode.html
+++ b/content/media/webaudio/test/test_mediaStreamAudioDestinationNode.html
@@ -8,18 +8,16 @@
 </head>
 <body>
 <pre id="test">
 <audio id="audioelem"></audio>
 <script class="testbody" type="text/javascript">
 
 SimpleTest.waitForExplicitFinish();
 addLoadEvent(function() {
-  SpecialPowers.setBoolPref("media.webaudio.enabled", true);
-
   var context = new AudioContext();
   var buffer = context.createBuffer(1, 2048, context.sampleRate);
   for (var i = 0; i < 2048; ++i) {
     buffer.getChannelData(0)[i] = Math.sin(440 * 2 * Math.PI * i / context.sampleRate);
   }
 
   var source = context.createBufferSource();
   source.buffer = buffer;
@@ -30,17 +28,16 @@ addLoadEvent(function() {
   var elem = document.getElementById('audioelem');
   elem.mozSrcObject = dest.stream;
   elem.onloadedmetadata = function() {
     ok(true, "got metadata event");
     setTimeout(function() {
       is(elem.played.length, 1, "should have a played interval");
       is(elem.played.start(0), 0, "should have played immediately");
       isnot(elem.played.end(0), 0, "should have played for a non-zero interval");
-      SpecialPowers.clearUserPref("media.webaudio.enabled");
       SimpleTest.finish();
     }, 2000);
   };
 
   source.start(0);
   elem.play();
 });
 </script>
--- a/content/media/webaudio/test/test_mixingRules.html
+++ b/content/media/webaudio/test/test_mixingRules.html
@@ -354,18 +354,16 @@ function checkResult(event) {
     }
 
     sp.onaudioprocess = null;
     SimpleTest.finish();
 }
 
 SimpleTest.waitForExplicitFinish();
 function runTest() {
-    SpecialPowers.setBoolPref("media.webaudio.enabled", true);
-
     // Create 8-channel offline audio context.
     // Each test will render 8 sample-frames starting at sample-frame position testNumber * 8.
     var totalFrameLength = numberOfTests * singleTestFrameLength;
     context = new AudioContext();
     var nextPowerOfTwo = 256;
     while (nextPowerOfTwo < totalFrameLength) {
         nextPowerOfTwo *= 2;
     }
--- a/content/media/webaudio/test/test_offlineDestinationChannelCountLess.html
+++ b/content/media/webaudio/test/test_offlineDestinationChannelCountLess.html
@@ -7,17 +7,16 @@
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
 </head>
 <body>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
 SimpleTest.waitForExplicitFinish();
 addLoadEvent(function() {
-  SpecialPowers.setBoolPref("media.webaudio.enabled", true);
   var ctx = new OfflineAudioContext(2, 100, 22050);
 
   var buf = ctx.createBuffer(6, 100, ctx.sampleRate);
   for (var i = 0; i < 6; ++i) {
     for (var j = 0; j < 100; ++j) {
       buf.getChannelData(i)[j] = Math.sin(2 * Math.PI * 200 * j / ctx.sampleRate);
     }
   }
@@ -28,17 +27,16 @@ addLoadEvent(function() {
   src.connect(ctx.destination);
   ctx.destination.channelCountMode = "max";
   ctx.startRendering();
   ctx.oncomplete = function(e) {
     is(e.renderedBuffer.numberOfChannels, 2, "Correct expected number of buffers");
     compareBuffers(e.renderedBuffer.getChannelData(0), buf.getChannelData(0));
     compareBuffers(e.renderedBuffer.getChannelData(1), buf.getChannelData(1));
 
-    SpecialPowers.clearUserPref("media.webaudio.enabled");
     SimpleTest.finish();
   };
 });
 
 </script>
 </pre>
 </body>
 </html>
--- a/content/media/webaudio/test/test_offlineDestinationChannelCountMore.html
+++ b/content/media/webaudio/test/test_offlineDestinationChannelCountMore.html
@@ -7,17 +7,16 @@
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
 </head>
 <body>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
 SimpleTest.waitForExplicitFinish();
 addLoadEvent(function() {
-  SpecialPowers.setBoolPref("media.webaudio.enabled", true);
   var ctx = new OfflineAudioContext(6, 100, 22050);
 
   var buf = ctx.createBuffer(2, 100, ctx.sampleRate);
   for (var i = 0; i < 2; ++i) {
     for (var j = 0; j < 100; ++j) {
       buf.getChannelData(i)[j] = Math.sin(2 * Math.PI * 200 * j / ctx.sampleRate);
     }
   }
@@ -32,17 +31,16 @@ addLoadEvent(function() {
   ctx.oncomplete = function(e) {
     is(e.renderedBuffer.numberOfChannels, 6, "Correct expected number of buffers");
     compareBuffers(e.renderedBuffer.getChannelData(0), buf.getChannelData(0));
     compareBuffers(e.renderedBuffer.getChannelData(1), buf.getChannelData(1));
     for (var i = 2; i < 6; ++i) {
       compareBuffers(e.renderedBuffer.getChannelData(i), emptyBuffer.getChannelData(0));
     }
 
-    SpecialPowers.clearUserPref("media.webaudio.enabled");
     SimpleTest.finish();
   };
 });
 
 </script>
 </pre>
 </body>
 </html>
--- a/content/media/webaudio/test/test_pannerNode.html
+++ b/content/media/webaudio/test/test_pannerNode.html
@@ -10,18 +10,16 @@
 <script class="testbody" type="text/javascript">
 
 function near(a, b, msg) {
   ok(Math.abs(a - b) < 1e-4, msg);
 }
 
 SimpleTest.waitForExplicitFinish();
 addLoadEvent(function() {
-  SpecialPowers.setBoolPref("media.webaudio.enabled", true);
-
   var context = new AudioContext();
   var buffer = context.createBuffer(1, 2048, context.sampleRate);
   for (var i = 0; i < 2048; ++i) {
     buffer.getChannelData(0)[i] = Math.sin(440 * 2 * Math.PI * i / context.sampleRate);
   }
 
   var destination = context.destination;
 
@@ -63,17 +61,16 @@ addLoadEvent(function() {
   panner.setVelocity(1, 1, 1);
 
   source.start(0);
   SimpleTest.executeSoon(function() {
     source.stop(0);
     source.disconnect();
     panner.disconnect();
 
-    SpecialPowers.clearUserPref("media.webaudio.enabled");
     SimpleTest.finish();
   });
 });
 
 </script>
 </pre>
 </body>
 </html>
--- a/content/media/webaudio/test/test_pannerNode_equalPower.html
+++ b/content/media/webaudio/test/test_pannerNode_equalPower.html
@@ -9,19 +9,17 @@
 <script type="text/javascript" src="blink/panner-model-testing.js"></script>
 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
 </head>
 <body>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 SimpleTest.waitForExplicitFinish();
 addLoadEvent(function() {
-  SpecialPowers.setBoolPref("media.webaudio.enabled", true);
   function checkFinished() {
-    SpecialPowers.clearUserPref("media.webaudio.enabled");
     SimpleTest.finish();
   }
   var ctx = new OfflineAudioContext(2, sampleRate * renderLengthSeconds, sampleRate);
   createTestAndRun(ctx, nodesToCreate, 2, checkFinished);
 });
 </script>
 </pre>
 </body>
--- a/content/media/webaudio/test/test_periodicWave.html
+++ b/content/media/webaudio/test/test_periodicWave.html
@@ -7,30 +7,28 @@
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
 </head>
 <body>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
 SimpleTest.waitForExplicitFinish();
 addLoadEvent(function() {
-  SpecialPowers.setBoolPref("media.webaudio.enabled", true);
   var ac = new AudioContext();
   var real = new Float32Array(4096);
   var imag = new Float32Array(4096);
   var table = ac.createPeriodicWave(real, imag);
   expectException(function() {
     ac.createPeriodicWave(new Float32Array(512), imag);
   }, DOMException.NOT_SUPPORTED_ERR);
   expectException(function() {
     ac.createPeriodicWave(new Float32Array(0), new Float32Array(0));
   }, DOMException.NOT_SUPPORTED_ERR);
   expectException(function() {
     ac.createPeriodicWave(new Float32Array(4097), new Float32Array(4097));
   }, DOMException.NOT_SUPPORTED_ERR);
-  SpecialPowers.clearUserPref("media.webaudio.enabled");
   SimpleTest.finish();
 });
 
 </script>
 </pre>
 </body>
 </html>
--- a/content/media/webaudio/test/test_scriptProcessorNode.html
+++ b/content/media/webaudio/test/test_scriptProcessorNode.html
@@ -12,18 +12,16 @@
 
 // We do not use our generic graph test framework here because
 // the testing logic here is sort of complicated, and would
 // not be easy to map to OfflineAudioContext, as ScriptProcessorNodes
 // can experience delays.
 
 SimpleTest.waitForExplicitFinish();
 addLoadEvent(function() {
-  SpecialPowers.setBoolPref("media.webaudio.enabled", true);
-
   var context = new AudioContext();
   var buffer = null;
 
   var sourceSP = context.createJavaScriptNode(2048);
   sourceSP.addEventListener("audioprocess", function(e) {
     // generate the audio
     for (var i = 0; i < 2048; ++i) {
       // Make sure our first sample won't be zero
@@ -105,17 +103,16 @@ addLoadEvent(function() {
       compareBuffers(e.inputBuffer.getChannelData(1), buffer.getChannelData(1), Math.min(firstNonZero, 2048), 2048 - firstNonZero, 0, -firstNonZero);
       compareBuffers(e.outputBuffer.getChannelData(0), emptyBuffer.getChannelData(0));
       compareBuffers(e.outputBuffer.getChannelData(1), emptyBuffer.getChannelData(0));
 
       if (firstNonZero == 0) {
         // If we did not experience any delays, the test is done!
         sp.onaudioprocess = null;
 
-        SpecialPowers.clearUserPref("media.webaudio.enabled");
         SimpleTest.finish();
       } else if (firstNonZero != 2048) {
         // In case we just saw a zero buffer this time, wait one more round
         sp.onaudioprocess = function(e) {
           is(e.target, sp, "Correct event target");
           ok(e.playbackTime > lastPlaybackTime, "playbackTime correctly set");
           lastPlaybackTime = e.playbackTime;
           is(e.inputBuffer.numberOfChannels, 2, "Correct number of channels for the input buffer");
@@ -129,17 +126,16 @@ addLoadEvent(function() {
           compareBuffers(e.inputBuffer.getChannelData(1), buffer.getChannelData(1), 0, firstNonZero, 0, 2048 - firstNonZero);
           compareBuffers(e.inputBuffer.getChannelData(0), emptyBuffer.getChannelData(0), firstNonZero);
           compareBuffers(e.inputBuffer.getChannelData(1), emptyBuffer.getChannelData(0), firstNonZero);
           compareBuffers(e.outputBuffer.getChannelData(0), emptyBuffer.getChannelData(0));
           compareBuffers(e.outputBuffer.getChannelData(1), emptyBuffer.getChannelData(0));
 
           sp.onaudioprocess = null;
 
-          SpecialPowers.clearUserPref("media.webaudio.enabled");
           SimpleTest.finish();
         };
       }
     };
   };
 });
 
 </script>
--- a/content/media/webaudio/test/test_scriptProcessorNodeChannelCount.html
+++ b/content/media/webaudio/test/test_scriptProcessorNodeChannelCount.html
@@ -12,18 +12,16 @@
 
 // We do not use our generic graph test framework here because
 // the testing logic here is sort of complicated, and would
 // not be easy to map to OfflineAudioContext, as ScriptProcessorNodes
 // can experience delays.
 
 SimpleTest.waitForExplicitFinish();
 addLoadEvent(function() {
-  SpecialPowers.setBoolPref("media.webaudio.enabled", true);
-
   var context = new AudioContext();
   var buffer = context.createBuffer(6, 2048, context.sampleRate);
   for (var i = 0; i < 2048; ++i) {
     for (var j = 0; j < 6; ++j) {
       buffer.getChannelData(0)[i] = Math.sin(440 * j * Math.PI * i / context.sampleRate);
     }
   }
 
@@ -61,17 +59,16 @@ addLoadEvent(function() {
       compareBuffers(e.inputBuffer.getChannelData(0), monoBuffer.getChannelData(0));
       for (var i = 1; i < 3; ++i) {
         compareBuffers(e.inputBuffer.getChannelData(i), emptyBuffer.getChannelData(0));
       }
 
       sp.onaudioprocess = null;
       sp.disconnect(context.destination);
 
-      SpecialPowers.clearUserPref("media.webaudio.enabled");
       SimpleTest.finish();
     };
   };
 });
 
 </script>
 </pre>
 </body>
--- a/content/media/webaudio/test/test_scriptProcessorNodeZeroInputOutput.html
+++ b/content/media/webaudio/test/test_scriptProcessorNodeZeroInputOutput.html
@@ -7,33 +7,30 @@
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
 </head>
 <body>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
 SimpleTest.waitForExplicitFinish();
 addLoadEvent(function() {
-  SpecialPowers.setBoolPref("media.webaudio.enabled", true);
-
   var context = new AudioContext();
 
   var sp = context.createScriptProcessor(2048, 0, 2);
   sp.onaudioprocess = function(e) {
     is(e.inputBuffer.numberOfChannels, 0, "Should have 0 input channels");
     is(e.outputBuffer.numberOfChannels, 2, "Should have 2 output channels");
     sp.onaudioprocess = null;
 
     sp = context.createScriptProcessor(2048, 2, 0);
     sp.onaudioprocess = function(e) {
       is(e.inputBuffer.numberOfChannels, 2, "Should have 2 input channels");
       is(e.outputBuffer.numberOfChannels, 0, "Should have 0 output channels");
       sp.onaudioprocess = null;
 
-      SpecialPowers.clearUserPref("media.webaudio.enabled");
       SimpleTest.finish();
     };
   };
 });
 
 </script>
 </pre>
 </body>
--- a/content/media/webaudio/test/test_singleSourceDest.html
+++ b/content/media/webaudio/test/test_singleSourceDest.html
@@ -7,18 +7,16 @@
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
 </head>
 <body>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
 SimpleTest.waitForExplicitFinish();
 addLoadEvent(function() {
-  SpecialPowers.setBoolPref("media.webaudio.enabled", true);
-
   var context = new AudioContext();
   var buffer = context.createBuffer(1, 2048, context.sampleRate);
   for (var i = 0; i < 2048; ++i) {
     buffer.getChannelData(0)[i] = Math.sin(440 * 2 * Math.PI * i / context.sampleRate);
   }
 
   var destination = context.destination;
   is(destination.context, context, "Destination node has proper context");
@@ -53,17 +51,16 @@ addLoadEvent(function() {
         }, function(source) {
           source.noteOff(0);
         }, function() {
           testWith(context, buffer, destination, function(source) {
             source.noteGrainOn(0, 1, 0.5);
           }, function(source) {
             source.stop();
           }, function() {
-            SpecialPowers.clearUserPref("media.webaudio.enabled");
             SimpleTest.finish();
           });
         });
       });
     });
   });
 });
 
--- a/content/media/webaudio/test/webaudio.js
+++ b/content/media/webaudio/test/webaudio.js
@@ -86,24 +86,21 @@ function getEmptyBuffer(context, length)
  *                          in the output.  If omitted, the output is expected
  *                          to be silence.  The sum of the length of the expected
  *                          buffers should be equal to gTest.length.  This
  *                          function is guaranteed to be called before createGraph.
  */
 function runTest()
 {
   function done() {
-    SpecialPowers.clearUserPref("media.webaudio.enabled");
     SimpleTest.finish();
   }
 
   SimpleTest.waitForExplicitFinish();
   addLoadEvent(function() {
-    SpecialPowers.setBoolPref("media.webaudio.enabled", true);
-
     if (!gTest.numberOfChannels) {
       gTest.numberOfChannels = 2; // default
     }
 
     var testLength;
 
     function runTestOnContext(context, callback, testOutput) {
       if (!gTest.createExpectedBuffers) {
--- a/js/xpconnect/tests/chrome/test_paris_weakmap_keys.xul
+++ b/js/xpconnect/tests/chrome/test_paris_weakmap_keys.xul
@@ -42,17 +42,16 @@ https://bugzilla.mozilla.org/show_bug.cg
     is(live_map.get(get_div_style()), 12345, "Live map should have live style with right value before GC.");
 
   }
 
   make_live_map();
 
 
   // AudioContext is the only Paris bindings non-nsISupports refCounted class.
-  SpecialPowers.setBoolPref("media.webaudio.enabled", true);
 
   // non-nsISupports cycle-collected classes should fail as weak map keys.
   let context = new AudioContext();
   let contextFail = false;
   try {
     live_map.set(context, 2);
   } catch (e) {
     contextFail = true;
@@ -69,15 +68,14 @@ https://bugzilla.mozilla.org/show_bug.cg
     SpecialPowers.DOMWindowUtils.garbageCollect();
     SpecialPowers.DOMWindowUtils.garbageCollect();
 
     is(Cu.nondeterministicGetWeakMapKeys(live_map).length, 1,
        "Live nsISupports new DOM bindings wrappercached native weak map key should not be removed.");
 
     is(live_map.get(get_div_style()), 12345, "Live map should have live style with right value after GC.");
 
-    SpecialPowers.clearUserPref("media.webaudio.enabled");
     SimpleTest.finish();
   });
 
   ]]>
   </script>
 </window>
--- a/testing/profiles/prefs_general.js
+++ b/testing/profiles/prefs_general.js
@@ -126,15 +126,18 @@ user_pref("dom.navigator-property.disabl
 
 // Make sure the disk cache doesn't get auto disabled
 user_pref("network.http.bypass-cachelock-threshold", 200000);
 
 // Enable Gamepad
 user_pref("dom.gamepad.enabled", true);
 user_pref("dom.gamepad.non_standard_events.enabled", true);
 
+// Enable Web Audio
+user_pref("media.webaudio.enabled", true);
+
 // Enable Web Audio legacy APIs
 user_pref("media.webaudio.legacy.AudioBufferSourceNode", true);
 user_pref("media.webaudio.legacy.AudioContext", true);
 user_pref("media.webaudio.legacy.AudioParam", true);
 user_pref("media.webaudio.legacy.BiquadFilterNode", true);
 user_pref("media.webaudio.legacy.PannerNode", true);
 user_pref("media.webaudio.legacy.OscillatorNode", true);