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

Side by Side Diff: LayoutTests/webaudio/realtimeanalyser-fft-scaling.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 PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../resources/js-test.js"></script> 4 <script src="../resources/js-test.js"></script>
5 <script src="resources/compatibility.js"></script>
5 <script src="resources/audio-testing.js"></script> 6 <script src="resources/audio-testing.js"></script>
6 </head> 7 </head>
7 8
8 <body> 9 <body>
9 <div id="description"></div> 10 <div id="description"></div>
10 <div id="console"></div> 11 <div id="console"></div>
11 12
12 <script> 13 <script>
13 description("Test scaling of FFT data for AnalyserNode"); 14 description("Test scaling of FFT data for AnalyserNode");
14 15
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 } 89 }
89 90
90 function runTests() { 91 function runTests() {
91 if (window.testRunner) { 92 if (window.testRunner) {
92 testRunner.dumpAsText(); 93 testRunner.dumpAsText();
93 testRunner.waitUntilDone(); 94 testRunner.waitUntilDone();
94 } 95 }
95 96
96 window.jsTestIsAsync = true; 97 window.jsTestIsAsync = true;
97 98
98 context = new webkitOfflineAudioContext(1, 2048, sampleRate); 99 context = new OfflineAudioContext(1, 2048, sampleRate);
99 100
100 // Use a sine wave oscillator as the reference source signal. 101 // Use a sine wave oscillator as the reference source signal.
101 osc = context.createOscillator(); 102 osc = context.createOscillator();
102 osc.type = "sine"; 103 osc.type = "sine";
103 osc.frequency.value = oscFrequency; 104 osc.frequency.value = oscFrequency;
104 osc.connect(context.destination); 105 osc.connect(context.destination);
105 106
106 // Create an analyser node for each of the possible valid sizes. 107 // Create an analyser node for each of the possible valid sizes.
107 for (order = 5; order < 12; ++order) { 108 for (order = 5; order < 12; ++order) {
108 analysers[order - 5] = context.createAnalyser(); 109 analysers[order - 5] = context.createAnalyser();
109 // No smoothing so between frames to simplify testing. 110 // No smoothing so between frames to simplify testing.
110 analysers[order - 5].smoothingTimeConstant = 0; 111 analysers[order - 5].smoothingTimeConstant = 0;
111 analysers[order - 5].fftSize = 1 << order; 112 analysers[order - 5].fftSize = 1 << order;
112 osc.connect(analysers[order - 5]); 113 osc.connect(analysers[order - 5]);
113 } 114 }
114 115
115 osc.start(); 116 osc.start();
116 context.oncomplete = checkResult; 117 context.oncomplete = checkResult;
117 context.startRendering(); 118 context.startRendering();
118 } 119 }
119 120
120 runTests(); 121 runTests();
121 successfullyParsed = true; 122 successfullyParsed = true;
122 </script> 123 </script>
123 </body> 124 </body>
124 </html> 125 </html>
OLDNEW
« no previous file with comments | « LayoutTests/webaudio/pannernode-basic.html ('k') | LayoutTests/webaudio/realtimeanalyser-fft-sizing.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698