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

Side by Side Diff: LayoutTests/webaudio/convolution-mono-mono.html

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 <!DOCTYPE html> 1 <!DOCTYPE html>
2 2
3 <html> 3 <html>
4 <head> 4 <head>
5 <script src="resources/compatibility.js"></script>
5 <script type="text/javascript" src="resources/audio-testing.js"></script> 6 <script type="text/javascript" src="resources/audio-testing.js"></script>
6 <script src="../resources/js-test.js"></script> 7 <script src="../resources/js-test.js"></script>
7 <script src="resources/convolution-testing.js"></script> 8 <script src="resources/convolution-testing.js"></script>
8 </head> 9 </head>
9 10
10 <body> 11 <body>
11 12
12 <div id="description"></div> 13 <div id="description"></div>
13 <div id="console"></div> 14 <div id="console"></div>
14 15
(...skipping 12 matching lines...) Expand all
27 // zero. 28 // zero.
28 function runTest() { 29 function runTest() {
29 if (window.testRunner) { 30 if (window.testRunner) {
30 testRunner.dumpAsText(); 31 testRunner.dumpAsText();
31 testRunner.waitUntilDone(); 32 testRunner.waitUntilDone();
32 } 33 }
33 34
34 window.jsTestIsAsync = true; 35 window.jsTestIsAsync = true;
35 36
36 // Create offline audio context. 37 // Create offline audio context.
37 var context = new webkitOfflineAudioContext(2, sampleRate * renderLengthSeco nds, sampleRate); 38 var context = new OfflineAudioContext(2, sampleRate * renderLengthSeconds, s ampleRate);
38 39
39 var squarePulse = createSquarePulseBuffer(context, pulseLengthFrames); 40 var squarePulse = createSquarePulseBuffer(context, pulseLengthFrames);
40 var trianglePulse = createTrianglePulseBuffer(context, 2 * pulseLengthFrames ); 41 var trianglePulse = createTrianglePulseBuffer(context, 2 * pulseLengthFrames );
41 42
42 var bufferSource = context.createBufferSource(); 43 var bufferSource = context.createBufferSource();
43 bufferSource.buffer = squarePulse; 44 bufferSource.buffer = squarePulse;
44 45
45 var convolver = context.createConvolver(); 46 var convolver = context.createConvolver();
46 convolver.normalize = false; 47 convolver.normalize = false;
47 convolver.buffer = squarePulse; 48 convolver.buffer = squarePulse;
48 49
49 bufferSource.connect(convolver); 50 bufferSource.connect(convolver);
50 convolver.connect(context.destination); 51 convolver.connect(context.destination);
51 52
52 bufferSource.start(0); 53 bufferSource.start(0);
53 54
54 context.oncomplete = checkConvolvedResult(trianglePulse); 55 context.oncomplete = checkConvolvedResult(trianglePulse);
55 context.startRendering(); 56 context.startRendering();
56 } 57 }
57 58
58 runTest(); 59 runTest();
59 successfullyParsed = true; 60 successfullyParsed = true;
60 61
61 </script> 62 </script>
62 63
63 </body> 64 </body>
64 </html> 65 </html>
OLDNEW
« no previous file with comments | « LayoutTests/webaudio/biquadfilternode-basic.html ('k') | LayoutTests/webaudio/convolver-setBuffer-null.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698