bug 1225003 test no crashes in decodeAudioData() and offline context memory reporting r=erahm
authorKarl Tomlinson <karlt+@karlt.net>
Wed, 18 Nov 2015 10:52:35 +1300
changeset 273047 4c1b0d416870a736cc8d2a9542c2e5e94b153677
parent 273046 3c4b0d791c5df823a2676825869ff06f3f5d1e01
child 273048 52ba2412304630898842e4a42c5d5ffaff8853e8
push id29693
push usercbook@mozilla.com
push dateWed, 18 Nov 2015 13:50:33 +0000
treeherdermozilla-central@1d6155d7e6c9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerserahm
bugs1225003
milestone45.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 1225003 test no crashes in decodeAudioData() and offline context memory reporting r=erahm
dom/media/webaudio/test/test_WebAudioMemoryReporting.html
--- a/dom/media/webaudio/test/test_WebAudioMemoryReporting.html
+++ b/dom/media/webaudio/test/test_WebAudioMemoryReporting.html
@@ -8,20 +8,24 @@
 <script class="testbody" type="text/javascript">
 
 SimpleTest.waitForExplicitFinish();
 
 var ac = new AudioContext();
 var sp = ac.createScriptProcessor(4096, 1, 1);
 sp.connect(ac.destination);
 
+// Not started so as to test
+// https://bugzilla.mozilla.org/show_bug.cgi?id=1225003#c2
+var oac = new OfflineAudioContext(1, 1, 48000);
+
 var nodeTypes = ["ScriptProcessorNode", "AudioDestinationNode"];
 var objectTypes = ["dom-nodes", "engine-objects", "stream-objects"];
 
-var usages = {};
+var usages = { "explicit/webaudio/audiocontext": 0 };
 
 for (var i = 0; i < nodeTypes.length; ++i) {
   for (var j = 0; j < objectTypes.length; ++j) {
     usages["explicit/webaudio/audio-node/" +
            nodeTypes[i] + "/" + objectTypes[j]] = 0;
   }
 }
 
@@ -38,10 +42,13 @@ var finished = function () {
   };
   SimpleTest.finish();
 }
 
 SpecialPowers.Cc["@mozilla.org/memory-reporter-manager;1"].
   getService(SpecialPowers.Ci.nsIMemoryReporterManager).
   getReports(handleReport, null, finished, null, /* anonymized = */ false);
 
+// To test bug 1225003, run a failing decodeAudioData() job over a time when
+// the tasks from getReports() are expected to run.
+ac.decodeAudioData(new ArrayBuffer(4), function(){}, function(){});
 </script>
 </html>