5 <script src=
"resources/compatibility.js"></script>
6 <script src=
"resources/audio-testing.js"></script>
7 <script src=
"../resources/js-test.js"></script>
11 <div id=
"description"></div>
12 <div id=
"console"></div>
14 description("Test attribute and basic functionality of StereoPannerNode.");
16 function checkAttributes() {
17 window
.jsTestIsAsync
= true;
19 var context
= new AudioContext();
20 var panner
= context
.createStereoPanner();
21 window
.panner
= panner
;
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');
30 shouldNotThrow('panner.channelCount = 1');
31 shouldThrow('panner.channelCount = 3');
32 shouldNotThrow('panner.channelCountMode = "explicit"');
33 shouldThrow('panner.channelCountMode = "max"');
39 successfullyParsed
= true;