content/media/webaudio/test/test_bug867089.html

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 <!DOCTYPE HTML>
     2 <html>
     3 <head>
     4   <title>Crashtest for bug 867089</title>
     5   <script type="text/javascript" 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">
    12 SimpleTest.waitForExplicitFinish();
    13 addLoadEvent(function() {
    14   var ctx = new AudioContext();
    16   // Test invalid playbackRate values for AudioBufferSourceNode.
    17   var source = ctx.createBufferSource();
    18   var buffer = ctx.createBuffer(2, 2048, 8000);
    19   source.buffer = buffer;
    20   source.playbackRate.value = 0.0;
    21   source.connect(ctx.destination);
    22   source.start(0);
    24   var source2 = ctx.createBufferSource();
    25   source2.buffer = buffer;
    26   source2.playbackRate.value = -1.0;
    27   source2.connect(ctx.destination);
    28   source2.start(0);
    30   var source3 = ctx.createBufferSource();
    31   source3.buffer = buffer;
    32   source3.playbackRate.value = 3000000.0;
    33   source3.connect(ctx.destination);
    34   source3.start(0);
    35   ok(true, "We did not crash.");
    36   SimpleTest.finish();
    37 });
    40 </script>
    41 </pre>
    42 </body>
    43 </html>

mercurial