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

Side by Side Diff: LayoutTests/webaudio/sample-accurate-scheduling.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 <!-- 3 <!--
4 Tests that we are able to schedule a series of notes to playback with sample-acc uracy. 4 Tests that we are able to schedule a series of notes to playback with sample-acc uracy.
5 We use an impulse so we can tell exactly where the rendering is happening. 5 We use an impulse so we can tell exactly where the rendering is happening.
6 --> 6 -->
7 7
8 <html> 8 <html>
9 <head> 9 <head>
10 <script src="../resources/js-test.js"></script> 10 <script src="../resources/js-test.js"></script>
11 <script src="resources/compatibility.js"></script>
11 <script type="text/javascript" src="resources/audio-testing.js"></script> 12 <script type="text/javascript" src="resources/audio-testing.js"></script>
12 <script type="text/javascript" src="resources/buffer-loader.js"></script> 13 <script type="text/javascript" src="resources/buffer-loader.js"></script>
13 </head> 14 </head>
14 15
15 <body> 16 <body>
16 17
17 <div id="description"></div> 18 <div id="description"></div>
18 <div id="console"></div> 19 <div id="console"></div>
19 20
20 <script> 21 <script>
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 107
107 function runTest() { 108 function runTest() {
108 if (window.testRunner) { 109 if (window.testRunner) {
109 testRunner.dumpAsText(); 110 testRunner.dumpAsText();
110 testRunner.waitUntilDone(); 111 testRunner.waitUntilDone();
111 } 112 }
112 113
113 window.jsTestIsAsync = true; 114 window.jsTestIsAsync = true;
114 115
115 // Create offline audio context. 116 // Create offline audio context.
116 context = new webkitOfflineAudioContext(2, sampleRate * lengthInSeconds, sam pleRate); 117 context = new OfflineAudioContext(2, sampleRate * lengthInSeconds, sampleRat e);
117 createImpulse(); 118 createImpulse();
118 119
119 for (var i = 0; i < sampleOffsets.length; ++i) { 120 for (var i = 0; i < sampleOffsets.length; ++i) {
120 var timeInSeconds = sampleOffsets[i] / sampleRate; 121 var timeInSeconds = sampleOffsets[i] / sampleRate;
121 playNote(timeInSeconds); 122 playNote(timeInSeconds);
122 } 123 }
123 124
124 context.oncomplete = checkSampleAccuracy; 125 context.oncomplete = checkSampleAccuracy;
125 context.startRendering(); 126 context.startRendering();
126 } 127 }
127 128
128 runTest(); 129 runTest();
129 130
130 </script> 131 </script>
131 132
132 </body> 133 </body>
133 </html> 134 </html>
OLDNEW
« no previous file with comments | « LayoutTests/webaudio/resources/waveshaper-testing.js ('k') | LayoutTests/webaudio/scriptprocessornode.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698