bug 1225003 test no crashes in decodeAudioData() and offline context memory reporting r=erahm

--HG--
extra : rebase_source : d7c0389512088d5b308a7f0ad9f667e36aaad3f2
This commit is contained in:
Karl Tomlinson 2015-11-18 10:52:35 +13:00
parent dbdd106a64
commit 50201f89c3

View File

@ -13,10 +13,14 @@ 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) {
@ -43,5 +47,8 @@ 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>