Auto merge of #23270 - Manishearth:audioparam-validation, r=ferjm

Add input validation for AudioParam methods

Waiting on a build to make WPT updates

Spec requires us to validate inputs, we aren't doing this here.

We don't need to check for things being finite since we already get the arguments as `Finite` values

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23270)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2019-04-26 03:32:48 -04:00 committed by GitHub
commit 56c2e85cab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 73 additions and 47 deletions

View file

@ -1,46 +1,19 @@
[audioparam-exceptional-values.html]
[X gain.gain.exponentialRampToValueAtTime(-1e-100,1) did not throw an exception.]
expected: FAIL
[X gain.gain.exponentialRampToValueAtTime(0,1) did not throw an exception.]
expected: FAIL
[X gain.gain.linearRampToValueAtTime(1,-1) did not throw an exception.]
expected: FAIL
[X gain.gain.setTargetAtTime(1,-1,1) did not throw an exception.]
expected: FAIL
[X gain.gain.setValueCurveAtTime([0,0,0\],1,-1) threw "TypeError" instead of EcmaScript error RangeError.]
expected: FAIL
[< [special cases 1\] 9 out of 9 assertions were failed.]
expected: FAIL
[X gain.gain.setValueCurveAtTime(curve, 1, -1) threw "TypeError" instead of EcmaScript error RangeError.]
expected: FAIL
[X gain.gain.exponentialRampToValueAtTime(1,-1) did not throw an exception.]
expected: FAIL
[X gain.gain.setValueAtTime(1,-1) did not throw an exception.]
expected: FAIL
[X gain.gain.setValueCurveAtTime(curve, 1, 0) threw "TypeError" instead of EcmaScript error RangeError.]
expected: FAIL
[# AUDIT TASK RUNNER FINISHED: 2 out of 6 tasks were failed.]
[< [special cases 1\] 4 out of 9 assertions were failed.]
expected: FAIL
[X gain.gain.setValueCurveAtTime([0,0,0\],-1,1) threw "TypeError" instead of EcmaScript error RangeError.]
expected: FAIL
[X gain.gain.setTargetAtTime(1,1,-1) did not throw an exception.]
expected: FAIL
[X gain.gain.exponentialRampToValueAtTime(1e-100,1) did not throw an exception.]
expected: FAIL
[< [special cases 2\] 3 out of 3 assertions were failed.]
[# AUDIT TASK RUNNER FINISHED: 1 out of 6 tasks were failed.]
expected: FAIL