OLD | NEW |
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 </head> | 7 </head> |
8 | 8 |
9 <body> | 9 <body> |
10 <div id="description"></div> | 10 <div id="description"></div> |
(...skipping 11 matching lines...) Expand all Loading... |
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", '"TypeError: Failed to set the \'buffer\'
property on \'AudioBufferSourceNode\': The provided value is not of type \'Audio
Buffer\'."'); | 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 = null", "'TypeError: buffer cannot be null'"); | 32 shouldThrow("source.buffer = null", '"TypeError: Failed to set the \'buffer\
' property on \'AudioBufferSourceNode\': buffer cannot be null"'); |
33 | 33 |
34 // Check that mono buffer can be set. | 34 // Check that mono buffer can be set. |
35 try { | 35 try { |
36 var monoBuffer = context.createBuffer(1, 1024, context.sampleRate); | 36 var monoBuffer = context.createBuffer(1, 1024, context.sampleRate); |
37 source.buffer = monoBuffer; | 37 source.buffer = monoBuffer; |
38 testPassed("Mono buffer can be set."); | 38 testPassed("Mono buffer can be set."); |
39 } catch(e) { | 39 } catch(e) { |
40 testFailed("Mono buffer can not be set."); | 40 testFailed("Mono buffer can not be set."); |
41 } | 41 } |
42 | 42 |
(...skipping 21 matching lines...) Expand all Loading... |
64 | 64 |
65 finishJSTest(); | 65 finishJSTest(); |
66 } | 66 } |
67 | 67 |
68 runTest(); | 68 runTest(); |
69 | 69 |
70 </script> | 70 </script> |
71 | 71 |
72 </body> | 72 </body> |
73 </html> | 73 </html> |
OLD | NEW |