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 src="resources/compatibility.js"></script> |
6 <script src="resources/audio-testing.js"></script> | 7 <script src="resources/audio-testing.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("Basic tests for MediaStreamAudioSourceNode API."); | 15 description("Basic tests for MediaStreamAudioSourceNode API."); |
15 | 16 |
(...skipping 12 matching lines...) Expand all Loading... |
28 finishJSTest(); | 29 finishJSTest(); |
29 } | 30 } |
30 } | 31 } |
31 | 32 |
32 function gotStream(stream) { | 33 function gotStream(stream) { |
33 s = stream; | 34 s = stream; |
34 testPassed('{audio:true} generated stream'); | 35 testPassed('{audio:true} generated stream'); |
35 shouldBe('s.getAudioTracks().length', '1'); | 36 shouldBe('s.getAudioTracks().length', '1'); |
36 shouldBe('s.getVideoTracks().length', '0'); | 37 shouldBe('s.getVideoTracks().length', '0'); |
37 | 38 |
38 context = new webkitAudioContext(); | 39 context = new AudioContext(); |
39 | 40 |
40 // Create an AudioNode from the stream. | 41 // Create an AudioNode from the stream. |
41 var mediaStreamSource = context.createMediaStreamSource(stream); | 42 var mediaStreamSource = context.createMediaStreamSource(stream); |
42 | 43 |
43 // Check number of inputs and outputs. | 44 // Check number of inputs and outputs. |
44 if (mediaStreamSource.numberOfInputs == 0) | 45 if (mediaStreamSource.numberOfInputs == 0) |
45 testPassed("Source AudioNode has no inputs."); | 46 testPassed("Source AudioNode has no inputs."); |
46 else | 47 else |
47 testFailed("Source AudioNode should not have inputs."); | 48 testFailed("Source AudioNode should not have inputs."); |
48 | 49 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 } | 87 } |
87 | 88 |
88 getUserMedia({audio:true}, gotStream); | 89 getUserMedia({audio:true}, gotStream); |
89 window.jsTestIsAsync = true; | 90 window.jsTestIsAsync = true; |
90 window.successfullyParsed = true; | 91 window.successfullyParsed = true; |
91 | 92 |
92 </script> | 93 </script> |
93 | 94 |
94 </body> | 95 </body> |
95 </html> | 96 </html> |
OLD | NEW |