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 <script src="resources/compatibility.js"></script> | 7 <script src="resources/compatibility.js"></script> |
8 </head> | 8 </head> |
9 | 9 |
10 <body> | 10 <body> |
(...skipping 12 matching lines...) Expand all Loading... |
23 testRunner.waitUntilDone(); | 23 testRunner.waitUntilDone(); |
24 } | 24 } |
25 | 25 |
26 window.jsTestIsAsync = true; | 26 window.jsTestIsAsync = true; |
27 | 27 |
28 context = new AudioContext(); | 28 context = new AudioContext(); |
29 source = context.createBufferSource(); | 29 source = context.createBufferSource(); |
30 | 30 |
31 // 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. |
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 = 57", '"TypeError: Failed to set the \'buffer\'
property on \'AudioBufferSourceNode\': The provided value is not of type \'Audio
Buffer\'."'); |
33 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\': The provided value is not of type \'Aud
ioBuffer\'."'); |
34 | 34 |
35 // Check that mono buffer can be set. | 35 // Check that mono buffer can be set. |
36 try { | 36 try { |
37 var monoBuffer = context.createBuffer(1, 1024, context.sampleRate); | 37 var monoBuffer = context.createBuffer(1, 1024, context.sampleRate); |
38 source.buffer = monoBuffer; | 38 source.buffer = monoBuffer; |
39 testPassed("Mono buffer can be set."); | 39 testPassed("Mono buffer can be set."); |
40 } catch(e) { | 40 } catch(e) { |
41 testFailed("Mono buffer can not be set."); | 41 testFailed("Mono buffer can not be set."); |
42 } | 42 } |
43 | 43 |
(...skipping 21 matching lines...) Expand all Loading... |
65 | 65 |
66 finishJSTest(); | 66 finishJSTest(); |
67 } | 67 } |
68 | 68 |
69 runTest(); | 69 runTest(); |
70 | 70 |
71 </script> | 71 </script> |
72 | 72 |
73 </body> | 73 </body> |
74 </html> | 74 </html> |
OLD | NEW |