diff --git a/content/media/test/huge-id3.mp3 b/content/media/test/huge-id3.mp3 new file mode 100644 index 00000000000..41cb93d805b Binary files /dev/null and b/content/media/test/huge-id3.mp3 differ diff --git a/content/media/test/manifest.js b/content/media/test/manifest.js index 1247208e4d6..15c5a92b8c0 100644 --- a/content/media/test/manifest.js +++ b/content/media/test/manifest.js @@ -188,6 +188,16 @@ var gPlayTests = [ // owl.mp3 as above, but with something even funnier going on in the ID3v2 tag // that causes DirectShow to fail. { name:"owl-funnier-id3.mp3", type:"audio/mpeg", duration:3.29 }, + // One second of silence with ~140KB of ID3 tags. Usually when the first MP3 + // frame is at such a high offset into the file, MP3FrameParser will give up + // and report that the stream is not MP3. However, it does not count ID3 tags + // in that offset. This test case makes sure that ID3 exclusion holds. + { name:"huge-id3.mp3", type:"audio/mpeg", duration:1.00 }, + // A truncated VBR MP3 with just enough frames to keep most decoders happy. + // The Xing header reports the length of the file to be around 10 seconds, but + // there is really only one second worth of data. We want MP3FrameParser to + // trust the header, so this should be reported as 10 seconds. + { name:"vbr-head.mp3", type:"audio/mpeg", duration:10.00 }, // Invalid file { name:"bogus.duh", type:"bogus/duh", duration:Number.NaN } diff --git a/content/media/test/mochitest.ini b/content/media/test/mochitest.ini index c12fde45184..70fb843057f 100644 --- a/content/media/test/mochitest.ini +++ b/content/media/test/mochitest.ini @@ -97,6 +97,7 @@ support-files = fragment_noplay.js fragment_play.js gizmo.mp4 + huge-id3.mp3 id3tags.mp3 invalid-cmap-s0c0.opus invalid-cmap-s0c2.opus @@ -164,6 +165,7 @@ support-files = variable-preskip.opus variable-samplerate.ogg variable-samplerate.opus + vbr-head.mp3 vbr.mp3 VID_0001.ogg video-overhang.ogg diff --git a/content/media/test/vbr-head.mp3 b/content/media/test/vbr-head.mp3 new file mode 100644 index 00000000000..35f41054915 Binary files /dev/null and b/content/media/test/vbr-head.mp3 differ