OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 | 2 |
3 <!-- | 3 <!-- |
4 Verifies GainNode attributes and their type. | 4 Verifies GainNode attributes and their type. |
5 --> | 5 --> |
6 | 6 |
7 <html> | 7 <html> |
8 <head> | 8 <head> |
9 <script src="../resources/js-test.js"></script> | 9 <script src="../resources/js-test.js"></script> |
| 10 <script src="resources/compatibility.js"></script> |
10 <script type="text/javascript" src="resources/audio-testing.js"></script> | 11 <script type="text/javascript" src="resources/audio-testing.js"></script> |
11 | 12 |
12 </head> | 13 </head> |
13 <body> | 14 <body> |
14 | 15 |
15 <script> | 16 <script> |
16 description("Tests GainNode attributes in IDL."); | 17 description("Tests GainNode attributes in IDL."); |
17 | 18 |
18 function runTest() { | 19 function runTest() { |
19 if (window.testRunner) { | 20 if (window.testRunner) { |
20 testRunner.dumpAsText(); | 21 testRunner.dumpAsText(); |
21 } | 22 } |
22 | 23 |
23 // Create audio context. | 24 // Create audio context. |
24 var context = new webkitAudioContext(); | 25 var context = new AudioContext(); |
25 | 26 |
26 // Create gain node. | 27 // Create gain node. |
27 var gainNode = context.createGain(); | 28 var gainNode = context.createGain(); |
28 | 29 |
29 if (gainNode.gain.toString().indexOf("AudioParam") > -1) | 30 if (gainNode.gain.toString().indexOf("AudioParam") > -1) |
30 testPassed("gain is of AudioParam type."); | 31 testPassed("gain is of AudioParam type."); |
31 else | 32 else |
32 testFailed("gain is not of AudioParam type."); | 33 testFailed("gain is not of AudioParam type."); |
33 } | 34 } |
34 | 35 |
35 runTest(); | 36 runTest(); |
36 </script> | 37 </script> |
37 | 38 |
38 </body> | 39 </body> |
39 </html> | 40 </html> |
OLD | NEW |