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

Side by Side Diff: LayoutTests/webaudio/audiobuffersource-channels.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/js-test.js"></script> 5 <script src="../resources/js-test.js"></script>
6 <script type="text/javascript" src="resources/audio-testing.js"></script> 6 <script type="text/javascript" src="resources/audio-testing.js"></script>
7 <script src="resources/compatibility.js"></script>
7 </head> 8 </head>
8 9
9 <body> 10 <body>
10 <div id="description"></div> 11 <div id="description"></div>
11 <div id="console"></div> 12 <div id="console"></div>
12 13
13 <script> 14 <script>
14 description("Tests that AudioBufferSourceNode validates AudioBuffer in .buffer a ttribute setter."); 15 description("Tests that AudioBufferSourceNode validates AudioBuffer in .buffer a ttribute setter.");
15 16
16 var context; 17 var context;
17 var source; 18 var source;
18 19
19 function runTest() { 20 function runTest() {
20 if (window.testRunner) { 21 if (window.testRunner) {
21 testRunner.dumpAsText(); 22 testRunner.dumpAsText();
22 testRunner.waitUntilDone(); 23 testRunner.waitUntilDone();
23 } 24 }
24 25
25 window.jsTestIsAsync = true; 26 window.jsTestIsAsync = true;
26 27
27 context = new webkitAudioContext(); 28 context = new AudioContext();
28 source = context.createBufferSource(); 29 source = context.createBufferSource();
29 30
30 // Make sure we can't set to something which isn't an AudioBuffer. 31 // Make sure we can't set to something which isn't an AudioBuffer.
31 shouldThrow("source.buffer = 57", '"TypeError: Failed to set the \'buffer\' property on \'AudioBufferSourceNode\': The provided value is not of type \'Audio Buffer\'."'); 32 shouldThrow("source.buffer = 57", '"TypeError: Failed to set the \'buffer\' property on \'AudioBufferSourceNode\': The provided value is not of type \'Audio Buffer\'."');
32 shouldThrow("source.buffer = null", '"TypeError: Failed to set the \'buffer\ ' property on \'AudioBufferSourceNode\': buffer cannot be null"'); 33 shouldThrow("source.buffer = null", '"TypeError: Failed to set the \'buffer\ ' property on \'AudioBufferSourceNode\': buffer cannot be null"');
33 34
34 // Check that mono buffer can be set. 35 // Check that mono buffer can be set.
35 try { 36 try {
36 var monoBuffer = context.createBuffer(1, 1024, context.sampleRate); 37 var monoBuffer = context.createBuffer(1, 1024, context.sampleRate);
37 source.buffer = monoBuffer; 38 source.buffer = monoBuffer;
(...skipping 26 matching lines...) Expand all
64 65
65 finishJSTest(); 66 finishJSTest();
66 } 67 }
67 68
68 runTest(); 69 runTest();
69 70
70 </script> 71 </script>
71 72
72 </body> 73 </body>
73 </html> 74 </html>
OLDNEW
« no previous file with comments | « LayoutTests/webaudio/audiobuffer.html ('k') | LayoutTests/webaudio/audiobuffersource-ended.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698