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 checkAttributes() { |
| 17 window.jsTestIsAsync = true; |
| 18 |
| 19 var context = new AudioContext(); |
| 20 var panner = context.createStereoPanner(); |
| 21 window.panner = panner; |
| 22 |
| 23 shouldBeTrue('panner.numberOfInputs === 1'); |
| 24 shouldBeTrue('panner.numberOfOutputs === 1'); |
| 25 shouldBeTrue('panner.pan.defaultValue === 0.0'); |
| 26 shouldBeTrue('panner.pan.value === 0.0'); |
| 27 panner.pan.value = 1.0; |
| 28 shouldBeTrue('panner.pan.value === 1.0'); |
| 29 |
| 30 shouldNotThrow('panner.channelCount = 1'); |
| 31 shouldThrow('panner.channelCount = 3'); |
| 32 shouldNotThrow('panner.channelCountMode = "explicit"'); |
| 33 shouldThrow('panner.channelCountMode = "max"'); |
| 34 |
| 35 finishJSTest(); |
| 36 } |
| 37 |
| 38 checkAttributes(); |
| 39 successfullyParsed = true; |
| 40 </script> |
| 41 </body> |
| 42 |
| 43 </html> |
OLD | NEW |