| Index: third_party/WebKit/LayoutTests/webaudio/audioparam-setValueCurve-exceptions.html
|
| diff --git a/third_party/WebKit/LayoutTests/webaudio/audioparam-setValueCurve-exceptions.html b/third_party/WebKit/LayoutTests/webaudio/audioparam-setValueCurve-exceptions.html
|
| index 1774379a036eac5e50ef8431e2adc6b9ee93fc45..918f4552e13b00817b174768c961a6869d17c754 100644
|
| --- a/third_party/WebKit/LayoutTests/webaudio/audioparam-setValueCurve-exceptions.html
|
| +++ b/third_party/WebKit/LayoutTests/webaudio/audioparam-setValueCurve-exceptions.html
|
| @@ -243,6 +243,33 @@
|
| done();
|
| });
|
|
|
| + audit.defineTask("curve lengths", function (done) {
|
| + var success = true;
|
| + var context = new OfflineAudioContext(1, testDurationFrames, sampleRate);
|
| + var g = context.createGain();
|
| + var time = 0;
|
| +
|
| + // Check for invalid curve lengths
|
| + success = Should("setValueCurveAtTime([], " + time + ", 0.01)", function () {
|
| + g.gain.setValueCurveAtTime(Float32Array.from([]), time, 0.01);
|
| + }).throw("InvalidStateError") && success;
|
| +
|
| + success = Should("setValueCurveAtTime([1], " + time + ", 0.01)", function () {
|
| + g.gain.setValueCurveAtTime(Float32Array.from([1]), time, 0.01);
|
| + }).throw("InvalidStateError") && success;
|
| +
|
| + success = Should("setValueCurveAtTime([1,2], " + time + ", 0.01)", function () {
|
| + g.gain.setValueCurveAtTime(Float32Array.from([1,2]), time, 0.01);
|
| + }).notThrow() && success;
|
| +
|
| + if (success)
|
| + testPassed("Exceptions for curve length correctly handled.\n");
|
| + else
|
| + testFailed("Exceptions for curve length not correctly handled.\n");
|
| +
|
| + done();
|
| + });
|
| +
|
| audit.defineTask("finish", function (done) {
|
| finishJSTest();
|
| done();
|
|
|