OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 |
| 4 <head> |
| 5 <script src="resources/compatibility.js"></script> |
| 6 <script src="resources/audio-testing.js"></script> |
| 7 <script src="../resources/js-test.js"></script> |
| 8 </head> |
| 9 |
| 10 <body> |
| 11 <div id="description"></div> |
| 12 <div id="console"></div> |
| 13 <script> |
| 14 description("Test attribute and basic functionality of StereoPannerNode."); |
| 15 |
| 16 function runTest() { |
| 17 |
| 18 window.jsTestIsAsync = true; |
| 19 |
| 20 context = new AudioContext(); |
| 21 var panner = context.createStereoPanner(); |
| 22 window.panner = panner; |
| 23 |
| 24 shouldBeTrue('panner.numberOfInputs === 1'); |
| 25 shouldBeTrue('panner.numberOfOutputs === 1'); |
| 26 shouldBeTrue('panner.pan.defaultValue === 0.0'); |
| 27 shouldBeTrue('panner.pan.value === 0.0'); |
| 28 panner.pan.value = 1.0; |
| 29 shouldBeTrue('panner.pan.value === 1.0'); |
| 30 |
| 31 shouldNotThrow('panner.channelCount = 1'); |
| 32 shouldThrow('panner.channelCount = 3'); |
| 33 shouldNotThrow('panner.channelCountMode = "explicit"'); |
| 34 shouldThrow('panner.channelCountMode = "max"'); |
| 35 |
| 36 finishJSTest(); |
| 37 } |
| 38 |
| 39 runTest(); |
| 40 successfullyParsed = true; |
| 41 </script> |
| 42 </body> |
| 43 |
| 44 </html> |
OLD | NEW |