| Index: third_party/WebKit/LayoutTests/webaudio/decode-audio-data-basic.html
|
| diff --git a/third_party/WebKit/LayoutTests/webaudio/decode-audio-data-basic.html b/third_party/WebKit/LayoutTests/webaudio/decode-audio-data-basic.html
|
| index ca84dc67088879fe885f912eb417bbd4a1dc8398..2fa0a44ebe4573d4c4e3c98d346bb503c2c56922 100644
|
| --- a/third_party/WebKit/LayoutTests/webaudio/decode-audio-data-basic.html
|
| +++ b/third_party/WebKit/LayoutTests/webaudio/decode-audio-data-basic.html
|
| @@ -20,6 +20,7 @@
|
| // Test files for decodeAudioData
|
| var validAudioFile = "resources/media/24bit-44khz.wav";
|
| var invalidAudioFile = "resources/media/invalid-audio-file.txt";
|
| + var invalidLiveStream = '../media/resources/test-live.webm';
|
|
|
| // Decoded data from validAudioFile
|
| var referenceDecodedAudioBuffer;
|
| @@ -107,6 +108,21 @@
|
| done);
|
| });
|
|
|
| + // Decode an invalid file (due to an unknown duration) and verify that the
|
| + // promise is rejected correctly.
|
| + audit.defineTask("decode-invalid-file-unknown-duration", function (done) {
|
| + var url = invalidLiveStream;
|
| + var prefix = "Decode invalid file with promise: ";
|
| + runDecode(url,
|
| + function (buffer) {
|
| + testFailed(prefix + "Incorrectly succeeded in decoding " + url);
|
| + },
|
| + function (e) {
|
| + testPassed(prefix + "Correctly failed to decode " + url + ": " + e.toString());
|
| + },
|
| + done);
|
| + });
|
| +
|
| // Decode a valid file and verify that the promise is fulfilled and the successCallback is
|
| // invoked and both have identical decode audio buffers.
|
| audit.defineTask("promise-and-success-callback", function (done) {
|
| @@ -210,7 +226,7 @@
|
|
|
| audit.runTasks();
|
|
|
| - successfullyParsed = true;
|
| + successfullyParsed = true;
|
| </script>
|
| </body>
|
| </html>
|
|
|