content/media/webaudio/test/test_bug875402.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/content/media/webaudio/test/test_bug875402.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,44 @@
     1.4 +<!DOCTYPE HTML>
     1.5 +<html>
     1.6 +<head>
     1.7 +  <title>Crashtest for bug 875402</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 +try { o1 = new OfflineAudioContext(1, 10, (new AudioContext()).sampleRate); } catch(e) {  }
    1.17 +try { o2 = o1.createScriptProcessor(); } catch(e) {  }
    1.18 +try { o4 = new OfflineAudioContext(1, 10, (new AudioContext()).sampleRate); } catch(e) {  }
    1.19 +try { o5 = o1.createChannelSplitter(4); } catch(e) {  }
    1.20 +try { o7 = o4.createScriptProcessor(1024, 4, 1); } catch(e) {  }
    1.21 +SpecialPowers.forceCC();
    1.22 +SpecialPowers.forceGC();
    1.23 +try { o1.startRendering(); } catch(e) {  }
    1.24 +try { o2.connect(o7); } catch(e) {  }
    1.25 +try { o7.connect(o4); } catch(e) {  }
    1.26 +try { o9 = o4.createScriptProcessor(1024, 1, 4); } catch(e) {  }
    1.27 +try { o2.connect(o7); } catch(e) {  }
    1.28 +try { o9.connect(o1); } catch(e) {  }
    1.29 +setTimeout("try { o2.connect(o9); } catch(e) {  } done();",1000)
    1.30 +try { o7.connect(o4); } catch(e) {  }
    1.31 +setTimeout("try { o5.disconnect() } catch(e) {  }",100)
    1.32 +try { o2.connect(o9); } catch(e) {  }
    1.33 +try { o4.startRendering(); } catch(e) {  }
    1.34 +try { o2.connect(o9); } catch(e) {  }
    1.35 +setTimeout("try { o7.connect(o4); } catch(e) {  }",50)
    1.36 +try { o13 = o4.createGain(); } catch(e) {  }
    1.37 +setTimeout("try { o7.connect(o13, 0, 0) } catch(e) {  }",50)
    1.38 +
    1.39 +function done() {
    1.40 +  ok(true, "We did not crash.");
    1.41 +  SimpleTest.finish();
    1.42 +}
    1.43 +
    1.44 +</script>
    1.45 +</pre>
    1.46 +</body>
    1.47 +</html>

mercurial