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

Side by Side Diff: LayoutTests/webaudio/resources/audioparam-testing.js

Issue 208943004: Update WebAudio layout tests to use unprefixed AudioContext. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add console.log to compatibility.js Created 6 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 | Annotate | Revision Log
OLDNEW
1 var sampleRate = 44100; 1 var sampleRate = 44100;
2 2
3 // Information about the starting/ending times and starting/ending values for ea ch time interval. 3 // Information about the starting/ending times and starting/ending values for ea ch time interval.
4 var timeValueInfo; 4 var timeValueInfo;
5 5
6 // The difference between starting values between each time interval. 6 // The difference between starting values between each time interval.
7 var startingValueDelta; 7 var startingValueDelta;
8 8
9 // For any automation function that has an end or target value, the end value is based the starting 9 // For any automation function that has an end or target value, the end value is based the starting
10 // value of the time interval. The starting value will be increased or decrease d by 10 // value of the time interval. The starting value will be increased or decrease d by
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 function createAudioGraphAndTest(numberOfTests, initialValue, setValueFunction, automationFunction, testName, maxError, referenceFunction, jumpThreshold) 398 function createAudioGraphAndTest(numberOfTests, initialValue, setValueFunction, automationFunction, testName, maxError, referenceFunction, jumpThreshold)
399 { 399 {
400 if (window.testRunner) { 400 if (window.testRunner) {
401 testRunner.dumpAsText(); 401 testRunner.dumpAsText();
402 testRunner.waitUntilDone(); 402 testRunner.waitUntilDone();
403 } 403 }
404 404
405 window.jsTestIsAsync = true; 405 window.jsTestIsAsync = true;
406 406
407 // Create offline audio context. 407 // Create offline audio context.
408 context = new webkitOfflineAudioContext(2, renderLength(numberOfTests), samp leRate); 408 context = new OfflineAudioContext(2, renderLength(numberOfTests), sampleRate );
409 var constantBuffer = createConstantBuffer(context, 1, renderLength(numberOfT ests)); 409 var constantBuffer = createConstantBuffer(context, 1, renderLength(numberOfT ests));
410 410
411 // We use an AudioGainNode here simply as a convenient way to test the Audio Param 411 // We use an AudioGainNode here simply as a convenient way to test the Audio Param
412 // automation, since it's easy to pass a constant value through the node, au tomate the 412 // automation, since it's easy to pass a constant value through the node, au tomate the
413 // .gain attribute and observe the resulting values. 413 // .gain attribute and observe the resulting values.
414 414
415 gainNode = context.createGain(); 415 gainNode = context.createGain();
416 416
417 var bufferSource = context.createBufferSource(); 417 var bufferSource = context.createBufferSource();
418 bufferSource.buffer = constantBuffer; 418 bufferSource.buffer = constantBuffer;
(...skipping 12 matching lines...) Expand all
431 setValueFunction, 431 setValueFunction,
432 automationFunction); 432 automationFunction);
433 bufferSource.start(0); 433 bufferSource.start(0);
434 434
435 context.oncomplete = checkResultFunction(testName, 435 context.oncomplete = checkResultFunction(testName,
436 maxError, 436 maxError,
437 referenceFunction, 437 referenceFunction,
438 jumpThreshold); 438 jumpThreshold);
439 context.startRendering(); 439 context.startRendering();
440 } 440 }
OLDNEW
« no previous file with comments | « LayoutTests/webaudio/resources/audio-codec-test.js ('k') | LayoutTests/webaudio/resources/compatibility.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698