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

Unified Diff: third_party/WebKit/LayoutTests/webaudio/resources/panner-model-testing.js

Issue 1820403002: Implement Automations for PannerNode and AutioListener (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update test because CL for min/maxValue AudioParam landed Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/webaudio/resources/panner-model-testing.js
diff --git a/third_party/WebKit/LayoutTests/webaudio/resources/panner-model-testing.js b/third_party/WebKit/LayoutTests/webaudio/resources/panner-model-testing.js
index f96857f8dd181410f17b33026eee231fee027133..16ef23ea9851254692281bee2ce15656de829f31 100644
--- a/third_party/WebKit/LayoutTests/webaudio/resources/panner-model-testing.js
+++ b/third_party/WebKit/LayoutTests/webaudio/resources/panner-model-testing.js
@@ -26,7 +26,7 @@ var renderedBuffer;
var renderedLeft;
var renderedRight;
-function createGraph(context, nodeCount) {
+function createGraph(context, nodeCount, positionSetter) {
bufferSource = new Array(nodeCount);
panner = new Array(nodeCount);
position = new Array(nodeCount);
@@ -51,7 +51,7 @@ function createGraph(context, nodeCount) {
var angle = angleStep * k;
position[k] = {angle : angle, x : Math.cos(angle), z : Math.sin(angle)};
- panner[k].setPosition(position[k].x, 0, position[k].z);
+ positionSetter(panner[k], position[k].x, 0, position[k].z);
bufferSource[k].connect(panner[k]);
panner[k].connect(context.destination);
@@ -62,10 +62,10 @@ function createGraph(context, nodeCount) {
}
}
-function createTestAndRun(context, nodeCount, numberOfSourceChannels) {
+function createTestAndRun(context, nodeCount, numberOfSourceChannels, positionSetter) {
numberOfChannels = numberOfSourceChannels;
- createGraph(context, nodeCount);
+ createGraph(context, nodeCount, positionSetter);
context.oncomplete = checkResult;
context.startRendering();

Powered by Google App Engine
This is Rietveld 408576698