Refactoring: Pull all fullscreen code out of Document and into its own helper class
[WebKit-https.git] / LayoutTests / webaudio / audiobuffersource-negative-playbackrate.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4     <title>audiobuffersource-negative-playbackrate</title>
5     <script src="../resources/js-test.js"></script>
6     <script src="resources/audio-testing.js"></script>
7     <script src="resources/audiobuffersource-testing.js"></script>
8
9     <script>
10
11     var sampleRate = 44100.0;
12     var sourceFrames = 128;
13     var renderFrames = 10;
14     var testSpacingFrames = 0;
15
16     var tests = [{ 
17         description:"Test playback at -1 playbackRate",
18         offsetFrame:0,
19         renderFrames:renderFrames,
20         expected:[127, 126, 125, 124, 123, 122, 121, 120, 119, 118],
21     }];
22
23     function go() {
24         jsTestIsAsync = true;
25
26         context = new webkitOfflineAudioContext(1, renderFrames, sampleRate);
27
28         var bufferSource = context.createBufferSource();
29         bufferSource.buffer = createRamp(context, 0, 127, sourceFrames);
30
31         bufferSource.connect(context.destination);
32         bufferSource.playbackRate.value = -1;
33         bufferSource.start(0);
34
35         context.oncomplete = checkAllTests;
36         context.startRendering();
37     }
38
39     </script>
40 </head>
41 <body onload="go()">
42 </body>
43 </html>