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