mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 16:55:40 +00:00
Bug 1581315 part 2. Fix incorrect behavior of PannerNode::SetRolloffFactor. r=karlt
Our implementation modified the state, in addition to throwing the exception. And the tests not only didn't test for this, but wouldn't have reached that code anyway, due to the harness giving up as soon as anything failed. Differential Revision: https://phabricator.services.mozilla.com/D46106 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
fa0ce4b209
commit
dbed44ddf4
@ -129,6 +129,7 @@ class PannerNode final : public AudioNode {
|
||||
aRv.ThrowRangeError(
|
||||
u"The rolloffFactor value passed to PannerNode must not be "
|
||||
u"negative.");
|
||||
return;
|
||||
}
|
||||
|
||||
mRolloffFactor = aRolloffFactor;
|
||||
|
@ -1,5 +1,4 @@
|
||||
[audiobuffer-copy-channel.html]
|
||||
expected: ERROR
|
||||
[X 4: buffer.copyToChannel(x, 0, -1) incorrectly threw IndexSizeError: "Index or size is negative or greater than the allowed amount".]
|
||||
expected: FAIL
|
||||
|
||||
@ -15,3 +14,8 @@
|
||||
[< [copyTo-exceptions\] 1 out of 8 assertions were failed.]
|
||||
expected: FAIL
|
||||
|
||||
[Executing "copyFrom-exceptions"]
|
||||
expected: FAIL
|
||||
|
||||
[Executing "copyTo-exceptions"]
|
||||
expected: FAIL
|
||||
|
@ -1,2 +1,6 @@
|
||||
[audiosource-time-limits.html]
|
||||
expected: ERROR
|
||||
[Executing "buffersource: huge stop time"]
|
||||
expected: FAIL
|
||||
|
||||
[Executing "oscillator: huge stop time"]
|
||||
expected: FAIL
|
||||
|
@ -6,3 +6,8 @@
|
||||
[X p1 instanceof Promise is not true. Got false.]
|
||||
expected: FAIL
|
||||
|
||||
[Executing "test-suspend"]
|
||||
expected: FAIL
|
||||
|
||||
[< [test-suspend\] 2 out of 4 assertions were failed.]
|
||||
expected: FAIL
|
||||
|
@ -1,2 +1,8 @@
|
||||
[audionode-disconnect-audioparam.html]
|
||||
expected: ERROR
|
||||
[Executing "disconnect(AudioParam)"]
|
||||
expected: FAIL
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1265406
|
||||
|
||||
[Executing "disconnect(AudioParam, output)"]
|
||||
expected: FAIL
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1265406
|
||||
|
@ -1,2 +1,8 @@
|
||||
[adding-events.html]
|
||||
expected: ERROR
|
||||
[Executing "linearRamp"]
|
||||
expected: FAIL
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1265406
|
||||
|
||||
[Executing "expoRamp"]
|
||||
expected: FAIL
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1265406
|
||||
|
@ -1,2 +1,6 @@
|
||||
[audioparam-large-endtime.html]
|
||||
expected: ERROR
|
||||
[Executing "linearRamp"]
|
||||
expected: FAIL
|
||||
|
||||
[Executing "exponentialRamp"]
|
||||
expected: FAIL
|
||||
|
@ -1,5 +1,4 @@
|
||||
[automation-rate.html]
|
||||
expected: ERROR
|
||||
[X Default AudioBufferSourceNode.detune.automationRate is not equal to k-rate. Got undefined.]
|
||||
expected: FAIL
|
||||
|
||||
@ -117,3 +116,8 @@
|
||||
[< [StereoPannerNode\] 1 out of 3 assertions were failed.]
|
||||
expected: FAIL
|
||||
|
||||
[Executing "AudioListener"]
|
||||
expected: FAIL
|
||||
|
||||
[# AUDIT TASK RUNNER FINISHED: 9 out of 10 tasks were failed.]
|
||||
expected: FAIL
|
||||
|
@ -1,3 +1,4 @@
|
||||
[k-rate-audioworklet.https.html]
|
||||
expected: ERROR
|
||||
bug: AudioWorketNode::GetParameters is not implemented
|
||||
[Executing "AudioWorklet k-rate AudioParam"]
|
||||
expected: FAIL
|
||||
bug: AudioWorketNode::GetParameters is not implemented
|
||||
|
@ -1,5 +1,4 @@
|
||||
[k-rate-panner.html]
|
||||
expected: ERROR
|
||||
[X k-rate positionX: Output of k-rate PannerNode expected to be equal to the array [0,0.0033637583255767822,0.0062364861369132996,0.008294522762298584,0.009320056065917015,0.009223895147442818,0.00805223174393177,0.005976978689432144,0.0032713967375457287,0.00027436629170551896,-0.0026520458050072193,-0.005166400223970413,-0.006987776607275009,-0.00792707223445177,-0.00790623389184475,-0.006963531486690044...\] but differs in 1 places:\n\tIndex\tActual\t\t\tExpected\n\t[80\]\tNaN\tNaN]
|
||||
expected: FAIL
|
||||
|
||||
@ -279,3 +278,33 @@
|
||||
[X k-rate orientationZ k-rate output [384: 511\]: Expected 0.10211683064699173 for all values but found 127 unexpected values: \n\tIndex\tActual\n\t[1\]\t0.10214255005121231\n\t[2\]\t0.10216815769672394\n\t[3\]\t0.10219366103410721\n\t[4\]\t0.10221906751394272\n\t...and 123 more errors.]
|
||||
expected: FAIL
|
||||
|
||||
[Executing "Listener k-rate positionX"]
|
||||
expected: FAIL
|
||||
|
||||
[Executing "Listener k-rate positionY"]
|
||||
expected: FAIL
|
||||
|
||||
[Executing "Listener k-rate positionZ"]
|
||||
expected: FAIL
|
||||
|
||||
[Executing "Listener k-rate forwardX"]
|
||||
expected: FAIL
|
||||
|
||||
[Executing "Listener k-rate forwardY"]
|
||||
expected: FAIL
|
||||
|
||||
[Executing "Listener k-rate forwardZ"]
|
||||
expected: FAIL
|
||||
|
||||
[Executing "Listener k-rate upX"]
|
||||
expected: FAIL
|
||||
|
||||
[Executing "Listener k-rate upY"]
|
||||
expected: FAIL
|
||||
|
||||
[Executing "Listener k-rate upZ"]
|
||||
expected: FAIL
|
||||
|
||||
[# AUDIT TASK RUNNER FINISHED: 5 out of 14 tasks were failed.]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -1,2 +1,4 @@
|
||||
[retrospective-exponentialRampToValueAtTime.html]
|
||||
expected: ERROR
|
||||
[Executing "test"]
|
||||
expected: FAIL
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1265406
|
||||
|
@ -1,2 +1,4 @@
|
||||
[retrospective-linearRampToValueAtTime.html]
|
||||
expected: ERROR
|
||||
[Executing "test"]
|
||||
expected: FAIL
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1265406
|
||||
|
@ -1,2 +1,4 @@
|
||||
[retrospective-setTargetAtTime.html]
|
||||
expected: ERROR
|
||||
[Executing "test"]
|
||||
expected: FAIL
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1265406
|
||||
|
@ -1,2 +1,4 @@
|
||||
[retrospective-setValueAtTime.html]
|
||||
expected: ERROR
|
||||
[Executing "test"]
|
||||
expected: FAIL
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1265406
|
||||
|
@ -1,2 +1,4 @@
|
||||
[retrospective-setValueCurveAtTime.html]
|
||||
expected: ERROR
|
||||
[Executing "test"]
|
||||
expected: FAIL
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1265406
|
||||
|
@ -1,2 +1,3 @@
|
||||
[audioworklet-audioparam-size.https.html]
|
||||
expected: ERROR
|
||||
[Executing "Verify Size of AudioParam Arrays"]
|
||||
expected: FAIL
|
||||
|
@ -1,2 +1,3 @@
|
||||
[audioworklet-audioparam.https.html]
|
||||
expected: ERROR
|
||||
[Executing "Verifying AudioParam in AudioWorkletNode"]
|
||||
expected: FAIL
|
||||
|
@ -1,7 +1,10 @@
|
||||
[audioworklet-messageport.https.html]
|
||||
expected:
|
||||
if release_or_beta: OK
|
||||
ERROR
|
||||
[\n Test MessagePort in AudioWorkletNode and AudioWorkletProcessor\n ]
|
||||
expected: FAIL
|
||||
|
||||
[Executing "Test postMessage from AudioWorkletProcessor to AudioWorkletNode"]
|
||||
expected: FAIL
|
||||
|
||||
[Executing "Test postMessage from AudioWorkletNode to AudioWorkletProcessor"]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -1,8 +1,6 @@
|
||||
[audioworklet-postmessage-sharedarraybuffer.https.html]
|
||||
expected:
|
||||
if release_or_beta: OK
|
||||
ERROR
|
||||
[\n Test passing SharedArrayBuffer to an AudioWorklet\n ]
|
||||
expected:
|
||||
if release_or_beta: FAIL
|
||||
|
||||
[Executing "Test postMessage from AudioWorkletProcessor to AudioWorkletNode"]
|
||||
expected: FAIL
|
||||
|
@ -1,9 +1,8 @@
|
||||
[audioworkletglobalscope-sample-rate.https.html]
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1572627
|
||||
expected:
|
||||
if release_or_beta: OK
|
||||
ERROR
|
||||
[\n Test sampleRate in AudioWorkletGlobalScope\n ]
|
||||
expected:
|
||||
if release_or_beta: FAIL
|
||||
|
||||
[Executing "Query |sampleRate| upon AudioWorkletGlobalScope construction"]
|
||||
expected: FAIL
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1572627
|
||||
|
@ -1,7 +1,7 @@
|
||||
[audioworkletglobalscope-timing-info.https.html]
|
||||
expected:
|
||||
if release_or_beta: OK
|
||||
ERROR
|
||||
[\n Test currentTime and currentFrame in AudioWorkletGlobalScope\n ]
|
||||
expected: FAIL
|
||||
|
||||
[Executing "Check the timing information from AudioWorkletProcessor"]
|
||||
expected: FAIL
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1265406
|
||||
|
@ -1,8 +1,10 @@
|
||||
[audioworkletnode-output-channel-count.https.html]
|
||||
expected:
|
||||
if release_or_beta: OK
|
||||
ERROR
|
||||
[\n Test the construction of AudioWorkletNode with real-time context\n ]
|
||||
expected:
|
||||
if release_or_beta: FAIL
|
||||
|
||||
[Executing "Dynamically change the channel count to if unspecified."]
|
||||
expected: FAIL
|
||||
|
||||
[Executing "Givien outputChannelCount must be honored."]
|
||||
expected: FAIL
|
||||
|
@ -1,2 +1,24 @@
|
||||
[no-dezippering.html]
|
||||
expected: ERROR
|
||||
[Executing "Test 0"]
|
||||
expected: FAIL
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1265406
|
||||
|
||||
[Executing "Test 1"]
|
||||
expected: FAIL
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1265406
|
||||
|
||||
[Executing "Test 2"]
|
||||
expected: FAIL
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1265406
|
||||
|
||||
[Executing "Test 3"]
|
||||
expected: FAIL
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1265406
|
||||
|
||||
[Executing "Test 4"]
|
||||
expected: FAIL
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1265406
|
||||
|
||||
[Executing "Test 5"]
|
||||
expected: FAIL
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1265406
|
||||
|
@ -1,2 +1,3 @@
|
||||
[active-processing.https.html]
|
||||
expected: ERROR
|
||||
[Executing "test"]
|
||||
expected: FAIL
|
||||
|
@ -1,2 +1,4 @@
|
||||
[audiochannelmerger-disconnect.html]
|
||||
expected: ERROR
|
||||
[Executing "silent-disconnect"]
|
||||
expected: FAIL
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1265406
|
||||
|
@ -1,8 +1,9 @@
|
||||
[active-processing.https.html]
|
||||
expected: ERROR
|
||||
[X AudioWorklet module loading rejected incorrectly with NetworkError: A network error occurred.. Got Promise.]
|
||||
expected: FAIL
|
||||
|
||||
[< [initialize\] 1 out of 1 assertions were failed.]
|
||||
expected: FAIL
|
||||
|
||||
[Executing "test"]
|
||||
expected: FAIL
|
||||
|
@ -1,5 +1,4 @@
|
||||
[convolver-response-4-chan.html]
|
||||
expected: ERROR
|
||||
[X 1: Channel 0 expected to be equal to the array [0,0,0.9458407163619995,0.844833254814148,1.7668657302856445,1.706931710243225,1.6640565395355225,1.7177008390426636,1.6363749504089355,1.8421846628189087,1.19059157371521,0.20796966552734375,-0.5251069068908691,-1.5682597160339355,-1.7950977087020874,-1.6221750974655151...\] but differs in 985 places:\n\tIndex\tActual\t\t\tExpected\n\t[0\]\t-3.5762786865234375e-7\t0.0000000000000000e+0\n\t[1\]\t-1.4901161193847656e-7\t0.0000000000000000e+0\n\t[2\]\t9.4584035873413086e-1\t9.4584071636199951e-1\n\t[3\]\t8.4483319520950317e-1\t8.4483325481414795e-1\n\t...and 981 more errors.]
|
||||
expected: FAIL
|
||||
|
||||
@ -75,3 +74,9 @@
|
||||
[X 5.1: Channel 1 expected to be equal to the array [0,0,0,2.2955899238586426,2.0720272064208984,3.9322750568389893,2.6799845695495605,1.0305213928222656,0.573580801486969,1.1953470706939697,1.1813762187957764,-0.4176445007324219,-2.2066144943237305,-2.9535818099975586,-1.275363564491272,0.26151078939437866...\] but differs in 1039 places:\n\tIndex\tActual\t\t\tExpected\n\t[0\]\t2.9802322387695313e-8\t0.0000000000000000e+0\n\t[2\]\t1.1175870895385742e-8\t0.0000000000000000e+0\n\t[3\]\t2.2955901622772217e+0\t2.2955899238586426e+0\n\t[4\]\t2.0720274448394775e+0\t2.0720272064208984e+0\n\t...and 1035 more errors.]
|
||||
expected: FAIL
|
||||
|
||||
[Executing "delayed buffer set"]
|
||||
expected: FAIL
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1265406
|
||||
|
||||
[# AUDIT TASK RUNNER FINISHED: 5 out of 7 tasks were failed.]
|
||||
expected: FAIL
|
||||
|
@ -1,2 +1,12 @@
|
||||
[no-dezippering.html]
|
||||
expected: ERROR
|
||||
[Executing "test0"]
|
||||
expected: FAIL
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1265406
|
||||
|
||||
[Executing "test1"]
|
||||
expected: FAIL
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1265406
|
||||
|
||||
[Executing "test2"]
|
||||
expected: FAIL
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1265406
|
||||
|
@ -1,2 +1,12 @@
|
||||
[no-dezippering.html]
|
||||
expected: ERROR
|
||||
[Executing "test0"]
|
||||
expected: FAIL
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1265406
|
||||
|
||||
[Executing "test2"]
|
||||
expected: FAIL
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1265406
|
||||
|
||||
[Executing "test3"]
|
||||
expected: FAIL
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1265406
|
||||
|
@ -1,7 +1,6 @@
|
||||
[cors-check.https.html]
|
||||
expected:
|
||||
if release_or_beta: OK
|
||||
ERROR
|
||||
[\n Test if MediaElementAudioSourceNode works for cross-origin redirects with\n "cors" request mode.\n ]
|
||||
expected: FAIL
|
||||
|
||||
[Executing "start-playback-and-capture"]
|
||||
expected: FAIL
|
||||
|
@ -2,10 +2,10 @@
|
||||
disabled:
|
||||
if (os == "android") and e10s: bug 1550895 (frequently fails on geckoview)
|
||||
bug: AudioWorkletNode::GetPort is not implemented
|
||||
expected:
|
||||
if release_or_beta: OK
|
||||
ERROR
|
||||
[\n Test if MediaElementAudioSourceNode works for cross-origin redirects with\n "no-cors" request mode.\n ]
|
||||
expected:
|
||||
if release_or_beta: FAIL
|
||||
|
||||
[Executing "start-playback-and-capture"]
|
||||
expected:
|
||||
if release_or_beta: OK
|
||||
FAIL
|
||||
|
@ -1,2 +1,9 @@
|
||||
[automation-changes.html]
|
||||
expected: ERROR
|
||||
[Executing "Set Listener.positionX.value"]
|
||||
expected: FAIL
|
||||
|
||||
[Executing "Listener.positionX.setValue"]
|
||||
expected: FAIL
|
||||
|
||||
[Executing "Listener.setPosition"]
|
||||
expected: FAIL
|
||||
|
@ -1,2 +1,3 @@
|
||||
[ctor-panner.html]
|
||||
expected: ERROR
|
||||
[Executing "default constructor"]
|
||||
expected: FAIL
|
||||
|
@ -1,2 +1,48 @@
|
||||
[panner-automation-basic.html]
|
||||
expected: ERROR
|
||||
[Executing "Stereo panner.positionX"]
|
||||
expected: FAIL
|
||||
|
||||
[Executing "Mono panner.positionX"]
|
||||
expected: FAIL
|
||||
|
||||
[Executing "Stereo panner.positionY"]
|
||||
expected: FAIL
|
||||
|
||||
[Executing "Mono panner.positionY"]
|
||||
expected: FAIL
|
||||
|
||||
[Executing "Stereo panner.positionZ"]
|
||||
expected: FAIL
|
||||
|
||||
[Executing "Mono panner.positionZ"]
|
||||
expected: FAIL
|
||||
|
||||
[Executing "Stereo listener.positionX"]
|
||||
expected: FAIL
|
||||
|
||||
[Executing "Mono listener.positionX"]
|
||||
expected: FAIL
|
||||
|
||||
[Executing "Stereo listener.positionY"]
|
||||
expected: FAIL
|
||||
|
||||
[Executing "Mono listener.positionY"]
|
||||
expected: FAIL
|
||||
|
||||
[Executing "Stereo listener.positionZ"]
|
||||
expected: FAIL
|
||||
|
||||
[Executing "Mono listener.positionZ"]
|
||||
expected: FAIL
|
||||
|
||||
[Executing "setPosition"]
|
||||
expected: FAIL
|
||||
|
||||
[Executing "orientation setter"]
|
||||
expected: FAIL
|
||||
|
||||
[Executing "forward setter"]
|
||||
expected: FAIL
|
||||
|
||||
[Executing "up setter"]
|
||||
expected: FAIL
|
||||
|
@ -1,2 +1,3 @@
|
||||
[pannernode-basic.html]
|
||||
expected: ERROR
|
||||
[Executing "listener"]
|
||||
expected: FAIL
|
||||
|
@ -1,2 +1,21 @@
|
||||
[no-dezippering.html]
|
||||
expected: ERROR
|
||||
[Executing "test mono input"]
|
||||
expected: FAIL
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1265406
|
||||
|
||||
[Executing "test stereo input"]
|
||||
expected: FAIL
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1265406
|
||||
|
||||
[Executing "test mono input setValue"]
|
||||
expected: FAIL
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1265406
|
||||
|
||||
[Executing "test stereo input setValue"]
|
||||
expected: FAIL
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1265406
|
||||
|
||||
[Executing "test mono input automation"]
|
||||
expected: FAIL
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1265406
|
||||
|
||||
|
@ -1,2 +1,4 @@
|
||||
[waveshaper-copy-curve.html]
|
||||
expected: ERROR
|
||||
[Executing "test copying"]
|
||||
expected: FAIL
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1265406
|
||||
|
@ -1187,7 +1187,21 @@ window.Audit = (function() {
|
||||
'> [' + this._label + '] ' +
|
||||
(this._description ? this._description : ''));
|
||||
|
||||
this._taskFunction(this, this.should.bind(this));
|
||||
// Ideally we would just use testharness async_test instead of reinventing
|
||||
// that wheel, but since it's been reinvented... At least make sure that
|
||||
// an exception while running a task doesn't preclude us running all the
|
||||
// _other_ tasks for the test.
|
||||
try {
|
||||
this._taskFunction(this, this.should.bind(this));
|
||||
} catch (e) {
|
||||
// Log the failure.
|
||||
test(() => { throw e; }, `Executing "${this.label}"`);
|
||||
if (this.state != TaskState.FINISHED) {
|
||||
// We threw before calling done(), so do that manually to run our
|
||||
// other tasks.
|
||||
this.done();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Update the task success based on the individual assertion/test inside.
|
||||
|
@ -108,6 +108,16 @@
|
||||
},
|
||||
'new PannerNode(c, ' + JSON.stringify(options) + ')')
|
||||
.throw(DOMException, 'NotSupportedError');
|
||||
should(
|
||||
() => {
|
||||
node = new PannerNode(context);
|
||||
node.channelCount = options.channelCount;
|
||||
},
|
||||
`node.channelCount = ${options.channelCount}`)
|
||||
.throw(DOMException, "NotSupportedError");
|
||||
should(node.channelCount,
|
||||
`node.channelCount after setting to ${options.channelCount}`)
|
||||
.beEqualTo(2);
|
||||
|
||||
options = {channelCount: 3};
|
||||
should(
|
||||
@ -116,6 +126,16 @@
|
||||
},
|
||||
'new PannerNode(c, ' + JSON.stringify(options) + ')')
|
||||
.throw(DOMException, 'NotSupportedError');
|
||||
should(
|
||||
() => {
|
||||
node = new PannerNode(context);
|
||||
node.channelCount = options.channelCount;
|
||||
},
|
||||
`node.channelCount = ${options.channelCount}`)
|
||||
.throw(DOMException, "NotSupportedError");
|
||||
should(node.channelCount,
|
||||
`node.channelCount after setting to ${options.channelCount}`)
|
||||
.beEqualTo(2);
|
||||
|
||||
options = {channelCount: 99};
|
||||
should(
|
||||
@ -124,6 +144,16 @@
|
||||
},
|
||||
'new PannerNode(c, ' + JSON.stringify(options) + ')')
|
||||
.throw(DOMException, 'NotSupportedError');
|
||||
should(
|
||||
() => {
|
||||
node = new PannerNode(context);
|
||||
node.channelCount = options.channelCount;
|
||||
},
|
||||
`node.channelCount = ${options.channelCount}`)
|
||||
.throw(DOMException, "NotSupportedError");
|
||||
should(node.channelCount,
|
||||
`node.channelCount after setting to ${options.channelCount}`)
|
||||
.beEqualTo(2);
|
||||
|
||||
// Test channelCountMode. A mode of "max" is illegal, but others are
|
||||
// ok.
|
||||
@ -154,6 +184,16 @@
|
||||
},
|
||||
'new PannerNode(c, ' + JSON.stringify(options) + ')')
|
||||
.throw(DOMException, 'NotSupportedError');
|
||||
should(
|
||||
() => {
|
||||
node = new PannerNode(context);
|
||||
node.channelCountMode = options.channelCountMode;
|
||||
},
|
||||
`node.channelCountMode = ${options.channelCountMode}`)
|
||||
.throw(DOMException, "NotSupportedError");
|
||||
should(node.channelCountMode,
|
||||
`node.channelCountMode after setting to ${options.channelCountMode}`)
|
||||
.beEqualTo("clamped-max");
|
||||
|
||||
options = {channelCountMode: 'foobar'};
|
||||
should(
|
||||
@ -162,6 +202,16 @@
|
||||
},
|
||||
'new PannerNode(c, " + JSON.stringify(options) + ")')
|
||||
.throw(TypeError);
|
||||
should(
|
||||
() => {
|
||||
node = new PannerNode(context);
|
||||
node.channelCountMode = options.channelCountMode;
|
||||
},
|
||||
`node.channelCountMode = ${options.channelCountMode}`)
|
||||
.notThrow(); // Invalid assignment to enum-valued attrs does not throw.
|
||||
should(node.channelCountMode,
|
||||
`node.channelCountMode after setting to ${options.channelCountMode}`)
|
||||
.beEqualTo("clamped-max");
|
||||
|
||||
// Test channelInterpretation.
|
||||
options = {channelInterpretation: 'speakers'};
|
||||
@ -200,6 +250,17 @@
|
||||
},
|
||||
'new PannerNode(c, ' + JSON.stringify(options) + ')')
|
||||
.throw(RangeError);
|
||||
should(
|
||||
() => {
|
||||
node = new PannerNode(context);
|
||||
node.maxDistance = options.maxDistance;
|
||||
},
|
||||
`node.maxDistance = ${options.maxDistance}`)
|
||||
.throw(RangeError);
|
||||
should(node.maxDistance,
|
||||
`node.maxDistance after setting to ${options.maxDistance}`)
|
||||
.beEqualTo(10000);
|
||||
|
||||
options = {maxDistance: 100};
|
||||
should(
|
||||
() => {
|
||||
@ -218,6 +279,17 @@
|
||||
},
|
||||
'new PannerNode(c, ' + JSON.stringify(options) + ')')
|
||||
.throw(RangeError);
|
||||
should(
|
||||
() => {
|
||||
node = new PannerNode(context);
|
||||
node.rolloffFactor = options.rolloffFactor;
|
||||
},
|
||||
`node.rolloffFactor = ${options.rolloffFactor}`)
|
||||
.throw(RangeError);
|
||||
should(node.rolloffFactor,
|
||||
`node.rolloffFactor after setting to ${options.rolloffFactor}`)
|
||||
.beEqualTo(1);
|
||||
|
||||
options = {rolloffFactor: 0};
|
||||
should(
|
||||
() => {
|
||||
@ -256,6 +328,17 @@
|
||||
},
|
||||
'new PannerNode(c, ' + JSON.stringify(options) + ')')
|
||||
.throw(DOMException, 'InvalidStateError');
|
||||
should(
|
||||
() => {
|
||||
node = new PannerNode(context);
|
||||
node.coneOuterGain = options.coneOuterGain;
|
||||
},
|
||||
`node.coneOuterGain = ${options.coneOuterGain}`)
|
||||
.throw(DOMException, 'InvalidStateError');
|
||||
should(node.coneOuterGain,
|
||||
`node.coneOuterGain after setting to ${options.coneOuterGain}`)
|
||||
.beEqualTo(0);
|
||||
|
||||
options = {coneOuterGain: 1.1};
|
||||
should(
|
||||
() => {
|
||||
@ -263,6 +346,17 @@
|
||||
},
|
||||
'new PannerNode(c, ' + JSON.stringify(options) + ')')
|
||||
.throw(DOMException, 'InvalidStateError');
|
||||
should(
|
||||
() => {
|
||||
node = new PannerNode(context);
|
||||
node.coneOuterGain = options.coneOuterGain;
|
||||
},
|
||||
`node.coneOuterGain = ${options.coneOuterGain}`)
|
||||
.throw(DOMException, 'InvalidStateError');
|
||||
should(node.coneOuterGain,
|
||||
`node.coneOuterGain after setting to ${options.coneOuterGain}`)
|
||||
.beEqualTo(0);
|
||||
|
||||
options = {coneOuterGain: 0.0};
|
||||
should(
|
||||
() => {
|
||||
|
Loading…
Reference in New Issue
Block a user