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

Side by Side Diff: LayoutTests/webaudio/audiobuffersource-channels.html

Issue 26883005: Get rid of custom bindings for AudioBufferSourceNode.buffer setter (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Improve exception message Created 7 years, 2 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-expected.txt » ('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 2
3 <html> 3 <html>
4 <head> 4 <head>
5 <script src="../fast/js/resources/js-test-pre.js"></script> 5 <script src="../fast/js/resources/js-test-pre.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 </head> 7 </head>
8 8
9 <body> 9 <body>
10 <div id="description"></div> 10 <div id="description"></div>
(...skipping 10 matching lines...) Expand all
21 testRunner.dumpAsText(); 21 testRunner.dumpAsText();
22 testRunner.waitUntilDone(); 22 testRunner.waitUntilDone();
23 } 23 }
24 24
25 window.jsTestIsAsync = true; 25 window.jsTestIsAsync = true;
26 26
27 context = new webkitAudioContext(); 27 context = new webkitAudioContext();
28 source = context.createBufferSource(); 28 source = context.createBufferSource();
29 29
30 // Make sure we can't set to something which isn't an AudioBuffer. 30 // Make sure we can't set to something which isn't an AudioBuffer.
31 shouldThrow("source.buffer = 57"); 31 shouldThrow("source.buffer = 57", "'TypeError: Type error'");
32 shouldThrow("source.buffer = null", "'TypeError: buffer cannot be null'");
32 33
33 // Check that mono buffer can be set. 34 // Check that mono buffer can be set.
34 try { 35 try {
35 var monoBuffer = context.createBuffer(1, 1024, context.sampleRate); 36 var monoBuffer = context.createBuffer(1, 1024, context.sampleRate);
36 source.buffer = monoBuffer; 37 source.buffer = monoBuffer;
37 testPassed("Mono buffer can be set."); 38 testPassed("Mono buffer can be set.");
38 } catch(e) { 39 } catch(e) {
39 testFailed("Mono buffer can not be set."); 40 testFailed("Mono buffer can not be set.");
40 } 41 }
41 42
(...skipping 22 matching lines...) Expand all
64 finishJSTest(); 65 finishJSTest();
65 } 66 }
66 67
67 runTest(); 68 runTest();
68 69
69 </script> 70 </script>
70 71
71 <script src="../fast/js/resources/js-test-post.js"></script> 72 <script src="../fast/js/resources/js-test-post.js"></script>
72 </body> 73 </body>
73 </html> 74 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/webaudio/audiobuffersource-channels-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698