| OLD | NEW |
| (Empty) |
| 1 <!DOCTYPE html> | |
| 2 <html> | |
| 3 | |
| 4 <head> | |
| 5 <script src="../resources/js-test.js"></script> | |
| 6 <script src="resources/compatibility.js"></script> | |
| 7 <script src="resources/audit-util.js"></script> | |
| 8 <script src="resources/audio-testing.js"></script> | |
| 9 </head> | |
| 10 | |
| 11 <body> | |
| 12 <div id="description"></div> | |
| 13 <div id="console"></div> | |
| 14 <script> | |
| 15 description("Test attribute and basic functionality of StereoPannerNode."); | |
| 16 | |
| 17 function checkAttributes() { | |
| 18 window.jsTestIsAsync = true; | |
| 19 | |
| 20 var 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 checkAttributes(); | |
| 40 successfullyParsed = true; | |
| 41 </script> | |
| 42 </body> | |
| 43 | |
| 44 </html> | |
| OLD | NEW |