1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/content/media/webaudio/test/test_bug867089.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,43 @@ 1.4 +<!DOCTYPE HTML> 1.5 +<html> 1.6 +<head> 1.7 + <title>Crashtest for bug 867089</title> 1.8 + <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> 1.9 + <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> 1.10 +</head> 1.11 +<body> 1.12 +<pre id="test"> 1.13 +<script class="testbody" type="text/javascript"> 1.14 + 1.15 +SimpleTest.waitForExplicitFinish(); 1.16 +addLoadEvent(function() { 1.17 + var ctx = new AudioContext(); 1.18 + 1.19 + // Test invalid playbackRate values for AudioBufferSourceNode. 1.20 + var source = ctx.createBufferSource(); 1.21 + var buffer = ctx.createBuffer(2, 2048, 8000); 1.22 + source.buffer = buffer; 1.23 + source.playbackRate.value = 0.0; 1.24 + source.connect(ctx.destination); 1.25 + source.start(0); 1.26 + 1.27 + var source2 = ctx.createBufferSource(); 1.28 + source2.buffer = buffer; 1.29 + source2.playbackRate.value = -1.0; 1.30 + source2.connect(ctx.destination); 1.31 + source2.start(0); 1.32 + 1.33 + var source3 = ctx.createBufferSource(); 1.34 + source3.buffer = buffer; 1.35 + source3.playbackRate.value = 3000000.0; 1.36 + source3.connect(ctx.destination); 1.37 + source3.start(0); 1.38 + ok(true, "We did not crash."); 1.39 + SimpleTest.finish(); 1.40 +}); 1.41 + 1.42 + 1.43 +</script> 1.44 +</pre> 1.45 +</body> 1.46 +</html>