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

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

Issue 912803005: Looping AudioBufferSourceNodes stop only if duration is explicitly given. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update according to review. Created 5 years, 10 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 function createTestBuffer(context, sampleFrameLength) { 1 function createTestBuffer(context, sampleFrameLength) {
2 var audioBuffer = context.createBuffer(1, sampleFrameLength, context.sampleR ate); 2 var audioBuffer = context.createBuffer(1, sampleFrameLength, context.sampleR ate);
3 var channelData = audioBuffer.getChannelData(0); 3 var channelData = audioBuffer.getChannelData(0);
4 4
5 // Create a simple linear ramp starting at zero, with each value in the buff er equal to its index position. 5 // Create a simple linear ramp starting at zero, with each value in the buff er equal to its index position.
6 for (var i = 0; i < sampleFrameLength; ++i) 6 for (var i = 0; i < sampleFrameLength; ++i)
7 channelData[i] = i; 7 channelData[i] = i;
8 8
9 return audioBuffer; 9 return audioBuffer;
10 } 10 }
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 testPassed(description); 70 testPassed(description);
71 71
72 return success; 72 return success;
73 } 73 }
74 74
75 function checkAllTests(event) { 75 function checkAllTests(event) {
76 var renderedBuffer = event.renderedBuffer; 76 var renderedBuffer = event.renderedBuffer;
77 for (var i = 0; i < tests.length; ++i) 77 for (var i = 0; i < tests.length; ++i)
78 checkSingleTest(renderedBuffer, i); 78 checkSingleTest(renderedBuffer, i);
79 79
80 if (window.testRunner) 80 finishJSTest();
81 testRunner.notifyDone()
82 } 81 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698