Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / webaudio / panner-equalpower.html
blobdfddb83d9fdcc3f49f4eeea851fe67fe9483f971
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4 <script src="resources/compatibility.js"></script>
5 <script src="resources/audio-testing.js"></script>
6 <script src="../resources/js-test.js"></script>
7 <script src="resources/panner-model-testing.js"></script>
8 </head>
10 <body>
11 <div id="description"></div>
12 <div id="console"></div>
14 <script>
15 description("Test equal-power panner model of AudioPannerNode.");
17 // To test the panner, we create a number of panner nodes
18 // equally spaced on a semicircle at unit distance. The
19 // semicircle covers the azimuth range from -90 to 90 deg,
20 // covering full left to full right. Each source is an impulse
21 // turning at a different time and we check that the rendered
22 // impulse has the expected gain.
23 function runTest() {
24 if (window.testRunner) {
25 testRunner.dumpAsText();
26 testRunner.waitUntilDone();
29 window.jsTestIsAsync = true;
31 // Create offline audio context.
32 context = new OfflineAudioContext(2, sampleRate * renderLengthSeconds, sampleRate);
34 createTestAndRun(context, nodesToCreate, 1);
37 runTest();
38 successfullyParsed = true;
40 </script>
42 </body>
43 </html>