Refactoring: Pull all fullscreen code out of Document and into its own helper class
[WebKit-https.git] / LayoutTests / webaudio / biquad-bandpass.html
1 <!DOCTYPE html>
2
3 <html>
4 <head>
5 <script src="resources/audio-testing.js"></script>
6 <script src="../resources/js-test.js"></script>
7 <script src="resources/biquad-testing.js"></script>
8 </head>
9
10 <body>
11
12 <div id="description"></div>
13 <div id="console"></div>
14
15 <script>
16 description("Tests Biquad bandpass filter.");
17
18 function runTest() {
19     window.jsTestIsAsync = true;
20         
21     // Create offline audio context.
22     var context = new webkitOfflineAudioContext(2, sampleRate * renderLengthSeconds, sampleRate);
23
24     // Dummy filter to get filter type constant
25     var f = context.createBiquadFilter();
26
27     // The filters we want to test.
28     var filterParameters = [{cutoff : 0,    q : 0, gain : 1 },
29                             {cutoff : 1,    q : 0, gain : 1 },
30                             {cutoff : 0.5,  q : 0, gain : 1 },
31                             {cutoff : 0.25, q : 1, gain : 1 },
32                            ];
33
34     createTestAndRun(context, "bandpass", filterParameters);
35 }
36
37 runTest();
38
39 </script>
40 </body>
41 </html>