Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(916)

Side by Side Diff: third_party/WebKit/LayoutTests/webaudio/Panner/panner-automation-equalpower-stereo.html

Issue 2713943002: Convert more PannerNode tests to testharness (Closed)
Patch Set: Address review comments Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/webaudio/Panner/panner-automation-equalpower-stereo-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!doctype html> 1 <!doctype html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../resources/js-test.js"></script> 4 <script src="../../resources/testharness.js"></script>
5 <script src="../../resources/testharnessreport.js"></script>
5 <script src="../resources/audit-util.js"></script> 6 <script src="../resources/audit-util.js"></script>
6 <script src="../resources/audio-testing.js"></script> 7 <script src="../resources/audit.js"></script>
7 <script src="../resources/panner-model-testing.js"></script> 8 <script src="../resources/panner-model-testing.js"></script>
8 </head> 9 </head>
9 10
10 <body> 11 <body>
11 <div id="description"></div>
12 <div id="console"></div>
13
14 <script> 12 <script>
15 description("Test equal-power panner model of AudioPannerNode with stereo source."); 13 let audit = Audit.createTaskRunner();
16 14
17 // To test the panner, we create a number of panner nodes 15 // To test the panner, we create a number of panner nodes
18 // equally spaced on a semicircle at unit distance. The 16 // equally spaced on a semicircle at unit distance. The
19 // semicircle covers the azimuth range from -90 to 90 deg, 17 // semicircle covers the azimuth range from -90 to 90 deg,
20 // covering full left to full right. Each source is an impulse 18 // covering full left to full right. Each source is an impulse
21 // turning at a different time and we check that the rendered 19 // turning at a different time and we check that the rendered
22 // impulse has the expected gain. 20 // impulse has the expected gain.
23 function runTest() { 21 audit.define(
24 if (window.testRunner) { 22 {
25 testRunner.dumpAsText(); 23 label: 'test',
26 testRunner.waitUntilDone(); 24 description:
27 } 25 'Equal-power panner model of AudioPannerNode with stereo source' ,
26 },
27 (task, should) => {
28 // Create offline audio context.
29 context = new OfflineAudioContext(
30 2, sampleRate * renderLengthSeconds, sampleRate);
28 31
29 window.jsTestIsAsync = true; 32 createTestAndRun(
30 33 context, should, nodesToCreate, 2,
31 // Create offline audio context. 34 function(panner, x, y, z) {
32 context = new OfflineAudioContext(2, sampleRate * renderLengthSeconds, sampleRate); 35 panner.positionX.value = x;
33 36 panner.positionY.value = y;
34 createTestAndRun(context, nodesToCreate, 2, function (panner, x, y, z) { 37 panner.positionZ.value = z;
35 panner.positionX.value = x; 38 })
36 panner.positionY.value = y; 39 .then(() => task.done());
37 panner.positionZ.value = z;
38 }); 40 });
39 } 41
40 42 audit.run();
41 runTest();
42 successfullyParsed = true;
43
44 </script> 43 </script>
45 44
46 </body> 45 </body>
47 </html> 46 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/webaudio/Panner/panner-automation-equalpower-stereo-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698