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

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: 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
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 <script>
12 <div id="console"></div> 13 let audit = Audit.createTaskRunner();
13 14
14 <script> 15 //description("Test equal-power panner model of AudioPannerNode with stere o source.");
hongchan 2017/02/24 22:07:24 We don't need this anymore. Right?
Raymond Toy 2017/02/24 22:19:24 Done.
15 description("Test equal-power panner model of AudioPannerNode with stereo source.");
16 16
17 // To test the panner, we create a number of panner nodes 17 // To test the panner, we create a number of panner nodes
18 // equally spaced on a semicircle at unit distance. The 18 // equally spaced on a semicircle at unit distance. The
19 // semicircle covers the azimuth range from -90 to 90 deg, 19 // semicircle covers the azimuth range from -90 to 90 deg,
20 // covering full left to full right. Each source is an impulse 20 // covering full left to full right. Each source is an impulse
21 // turning at a different time and we check that the rendered 21 // turning at a different time and we check that the rendered
22 // impulse has the expected gain. 22 // impulse has the expected gain.
23 function runTest() { 23 audit.define(
24 if (window.testRunner) { 24 {
25 testRunner.dumpAsText(); 25 label: 'test',
26 testRunner.waitUntilDone(); 26 description:
27 } 27 'Equal-power panner model of AudioPannerNode with stereo source' ,
28 },
29 (task, should) => {
30 // Create offline audio context.
31 context = new OfflineAudioContext(
32 2, sampleRate * renderLengthSeconds, sampleRate);
28 33
29 window.jsTestIsAsync = true; 34 createTestAndRun(
30 35 context, should, nodesToCreate, 2,
31 // Create offline audio context. 36 function(panner, x, y, z) {
32 context = new OfflineAudioContext(2, sampleRate * renderLengthSeconds, sampleRate); 37 panner.positionX.value = x;
33 38 panner.positionY.value = y;
34 createTestAndRun(context, nodesToCreate, 2, function (panner, x, y, z) { 39 panner.positionZ.value = z;
35 panner.positionX.value = x; 40 })
36 panner.positionY.value = y; 41 .then(() => task.done());
37 panner.positionZ.value = z;
38 }); 42 });
39 } 43
40 44 audit.run();
41 runTest();
42 successfullyParsed = true;
43
44 </script> 45 </script>
45 46
46 </body> 47 </body>
47 </html> 48 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698