Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Unified Diff: third_party/WebKit/LayoutTests/webaudio/decode-audio-data-basic.html

Issue 2540373002: Merge M56: "Fail decodeAudioFileData() when duration is unknown." (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698