Bug 1180101 - Test 0 length atom inside moov; r=jya, a=test-only
authorAnthony Jones <ajones@mozilla.com>
Wed, 26 Aug 2015 18:13:01 +1200
changeset 289552 8b303a74c515
parent 289551 3011eba21201
child 289553 124a1bf2bdfb
push id5183
push usercbook@mozilla.com
push date2015-10-15 14:01 +0000
treeherdermozilla-beta@8b303a74c515 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjya, test-only
bugs1180101
milestone42.0
Bug 1180101 - Test 0 length atom inside moov; r=jya, a=test-only
dom/media/gtest/TestMP4Demuxer.cpp
dom/media/gtest/moz.build
dom/media/gtest/short-zero-in-moov.mp4
--- a/dom/media/gtest/TestMP4Demuxer.cpp
+++ b/dom/media/gtest/TestMP4Demuxer.cpp
@@ -421,8 +421,18 @@ TEST(MP4Demuxer, GetNextKeyframe)
         binding->mVideoTrack->GetNextRandomAccessPoint(&time);
         EXPECT_EQ(time.ToMicroseconds(), 1000000);
         binding->mTaskQueue->BeginShutdown();
       },
       DO_FAIL
     );
   });
 }
+
+TEST(MP4Demuxer, ZeroInMoov)
+{
+  nsRefPtr<MP4DemuxerBinding> binding = new MP4DemuxerBinding("short-zero-in-moov.mp4");
+  binding->RunTestAndWait([binding] () {
+    // It demuxes without error. That is sufficient.
+    binding->mTaskQueue->BeginShutdown();
+  });
+}
+
--- a/dom/media/gtest/moz.build
+++ b/dom/media/gtest/moz.build
@@ -40,16 +40,17 @@ if CONFIG['MOZ_RUST']:
 
 TEST_HARNESS_FILES.gtest += [
     '../test/gizmo-frag.mp4',
     '../test/gizmo.mp4',
     'dash_dashinit.mp4',
     'mediasource_test.mp4',
     'noise.mp3',
     'noise_vbr.mp3',
+    'short-zero-in-moov.mp4',
     'test.webm',
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 LOCAL_INCLUDES += [
     '/dom/media',
     '/dom/media/eme',
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..577318c8fa8aaf3bc8541844c07d3a5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