Bug 867089 - Test for invalid playbackRate values on an AudioBufferSourceNode. r=ehsan
☠☠ backed out by 4b68073547c0 ☠ ☠
authorPaul Adenot <paul@paul.cx>
Tue, 30 Apr 2013 16:04:44 +0200
changeset 141286 5447d49a2c6fcc4fe725676e0553ba66fe5a4f8d
parent 141285 ab9c9d0819a2b62feb9dd6c2ac9d9fd29fa08f75
child 141287 b2c7297fe7ed8ab6deeda3e48765d9edc3897b44
push id2579
push userakeybl@mozilla.com
push dateMon, 24 Jun 2013 18:52:47 +0000
treeherdermozilla-beta@b69b7de8a05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehsan
bugs867089
milestone23.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 867089 - Test for invalid playbackRate values on an AudioBufferSourceNode. r=ehsan
content/media/webaudio/test/Makefile.in
content/media/webaudio/test/test_bug867089.html
--- a/content/media/webaudio/test/Makefile.in
+++ b/content/media/webaudio/test/Makefile.in
@@ -14,16 +14,17 @@ MOCHITEST_FILES := \
   webaudio.js \
   test_bug808374.html \
   test_bug827541.html \
   test_bug839753.html \
   test_bug845960.html \
   test_bug856771.html \
   test_bug866570.html \
   test_bug866737.html \
+  test_bug867089.html \
   test_analyserNode.html \
   test_AudioBuffer.html \
   test_AudioContext.html \
   test_AudioListener.html \
   test_AudioParam.html \
   test_audioBufferSourceNode.html \
   test_audioBufferSourceNodeLoop.html \
   test_audioBufferSourceNodeLoopStartEnd.html \
new file mode 100644
--- /dev/null
+++ b/content/media/webaudio/test/test_bug867089.html
@@ -0,0 +1,45 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+  <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;
+  source.playbackRate.value = 0.0;
+  source.connect(ctx.destination);
+  source.start(0);
+
+  var source2 = ctx.createBufferSource();
+  source2.buffer = buffer;
+  source2.playbackRate.value = -1.0;
+  source2.connect(ctx.destination);
+  source2.start(0);
+
+  var source2 = 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>