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

Side by Side Diff: LayoutTests/webaudio/audiobuffer.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
« no previous file with comments | « no previous file | LayoutTests/webaudio/audiobuffersource-channels.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
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/audio-testing.js"></script> 5 <script src="resources/audio-testing.js"></script>
6 <script src="resources/compatibility.js"></script>
6 </head> 7 </head>
7 <body> 8 <body>
8 <script> 9 <script>
9 description("Basic tests for AudioBuffer."); 10 description("Basic tests for AudioBuffer.");
10 11
11 var sampleRate = 44100.0 12 var sampleRate = 44100.0
12 var lengthInSeconds = 2; 13 var lengthInSeconds = 2;
13 var numberOfChannels = 4; 14 var numberOfChannels = 4;
14 15
15 var context = new webkitAudioContext(); 16 var context = new AudioContext();
16 var buffer = context.createBuffer(numberOfChannels, sampleRate * lengthInSeconds , sampleRate); 17 var buffer = context.createBuffer(numberOfChannels, sampleRate * lengthInSeconds , sampleRate);
17 18
18 if (buffer.sampleRate === sampleRate) 19 if (buffer.sampleRate === sampleRate)
19 testPassed("sampleRate has been set correctly."); 20 testPassed("sampleRate has been set correctly.");
20 else 21 else
21 testFailed("sampleRate should be set correctly."); 22 testFailed("sampleRate should be set correctly.");
22 23
23 if (buffer.length === sampleRate * lengthInSeconds) 24 if (buffer.length === sampleRate * lengthInSeconds)
24 testPassed("length has been set correctly."); 25 testPassed("length has been set correctly.");
25 else 26 else
(...skipping 20 matching lines...) Expand all
46 buffer.getChannelData(buffer.numberOfChannels); 47 buffer.getChannelData(buffer.numberOfChannels);
47 testFailed("Exception should be thrown when index is not less than numberOfC hannels."); 48 testFailed("Exception should be thrown when index is not less than numberOfC hannels.");
48 } catch(e) { 49 } catch(e) {
49 testPassed("Exception has been thrown correctly when index is not less than numberOfChannels."); 50 testPassed("Exception has been thrown correctly when index is not less than numberOfChannels.");
50 } 51 }
51 52
52 </script> 53 </script>
53 54
54 </body> 55 </body>
55 </html> 56 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/webaudio/audiobuffersource-channels.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698