test_bug867174.html (858B)
1 <!DOCTYPE HTML> 2 <html> 3 <head> 4 <title>Crashtest for bug 867174</title> 5 <script src="/tests/SimpleTest/SimpleTest.js"></script> 6 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> 7 </head> 8 <body> 9 <pre id="test"> 10 <script class="testbody" type="text/javascript"> 11 12 SimpleTest.waitForExplicitFinish(); 13 addLoadEvent(function() { 14 var ctx = new AudioContext(); 15 16 var source = ctx.createBufferSource(); 17 var buffer = ctx.createBuffer(2, 2048, 8000); 18 source.playbackRate.setTargetAtTime(0, 2, 3); 19 var sp = ctx.createScriptProcessor(); 20 source.connect(sp); 21 sp.connect(ctx.destination); 22 source.start(0); 23 24 sp.onaudioprocess = function() { 25 // Now set the buffer 26 source.buffer = buffer; 27 28 ok(true, "We did not crash."); 29 sp.onaudioprocess = null; 30 SimpleTest.finish(); 31 }; 32 }); 33 34 35 </script> 36 </pre> 37 </body> 38 </html>