Bug 867104 - Add a crashtest. r=ehsan a=bajaj
authorPaul Adenot <paul@paul.cx>
Tue, 14 May 2013 14:14:42 +0200
changeset 142650 3b1a78efc02179bdb6856a112c12b0f0a02db3fd
parent 142649 913b31ff6094ff850eef93e8b3e879994bef6622
child 142651 5d728f6c40ab5897592fc1f7987f82f34743e35d
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, bajaj
bugs867104
milestone23.0a2
Bug 867104 - Add a crashtest. r=ehsan a=bajaj
content/media/webaudio/test/Makefile.in
content/media/webaudio/test/test_bug867104.html
--- a/content/media/webaudio/test/Makefile.in
+++ b/content/media/webaudio/test/Makefile.in
@@ -15,16 +15,17 @@ MOCHITEST_FILES := \
   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_bug867104.html \
   test_bug867174.html \
   test_bug867203.html \
   test_analyserNode.html \
   test_AudioBuffer.html \
   test_AudioContext.html \
   test_AudioListener.html \
   test_AudioParam.html \
   test_audioParamExponentialRamp.html \
new file mode 100644
--- /dev/null
+++ b/content/media/webaudio/test/test_bug867104.html
@@ -0,0 +1,36 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+  <title>Crashtest for bug 867104</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();
+  var source = ctx.createBufferSource();
+  var b0 = ctx.createBuffer(32,798,22050);
+  var b1 = ctx.createBuffer(32,28,22050);
+  var sp = ctx.createScriptProcessor();
+  source.buffer = b0;
+  source.connect(sp);
+  source.start(0);
+  source.buffer = b1;
+  sp.onaudioprocess = function() {
+    ok(true, "We did not crash.");
+    sp.onaudioprocess = null;
+    SpecialPowers.clearUserPref("media.webaudio.enabled");
+    SimpleTest.finish();
+  };
+});
+
+
+</script>
+</pre>
+</body>
+</html>