Backed out changeset 1d9e4d1fe90e (bug 1123498) for checktest failures.
authorRyan VanderMeulen <ryanvm@gmail.com>
Mon, 02 Feb 2015 18:09:32 -0500
changeset 249559 751da1d2f7b10a780a419ace5f3c435a78da6dee
parent 249558 1d9e4d1fe90e164a2a41f627cb8a21cf46fb191c
child 249560 b4e61581f650f84331469c38909705b8f52ad405
push id4489
push userraliiev@mozilla.com
push dateMon, 23 Feb 2015 15:17:55 +0000
treeherdermozilla-beta@fd7c3dc24146 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1123498
milestone37.0a2
backs out1d9e4d1fe90e164a2a41f627cb8a21cf46fb191c
Backed out changeset 1d9e4d1fe90e (bug 1123498) for checktest failures. CLOSED TREE
dom/media/gtest/MockMediaResource.cpp
dom/media/gtest/TestMP4Demuxer.cpp
--- a/dom/media/gtest/MockMediaResource.cpp
+++ b/dom/media/gtest/MockMediaResource.cpp
@@ -55,18 +55,17 @@ MockMediaResource::ReadAt(int64_t aOffse
   mEntry--;
 
   return ferror(mFileHandle) ? NS_ERROR_FAILURE : NS_OK;
 }
 
 int64_t
 MockMediaResource::GetLength()
 {
-  fseek(mFileHandle, 0, SEEK_END);
-  return ftell(mFileHandle);
+  return fseek(mFileHandle, 0, SEEK_END);
 }
 
 void
 MockMediaResource::MockClearBufferedRanges()
 {
   mRanges.Clear();
 }
 
--- a/dom/media/gtest/TestMP4Demuxer.cpp
+++ b/dom/media/gtest/TestMP4Demuxer.cpp
@@ -326,39 +326,8 @@ TEST(MP4Demuxer, CENCFrag)
 
   i = 0;
   while (!!(sample = d->DemuxAudioSample())) {
     nsCString text = ToCryptoString(sample->crypto);
     EXPECT_STREQ(audio[i++], text.get());
   }
   EXPECT_EQ(ArrayLength(audio), i);
 }
-
-TEST(MP4Demuxer, GetNextKeyframe)
-{
-  nsRefPtr<MP4DemuxerBinding> b = new MP4DemuxerBinding("gizmo-frag.mp4");
-  MonitorAutoLock mon(b->mMonitor);
-  MP4Demuxer* d = b->demuxer;
-
-  EXPECT_TRUE(d->Init());
-
-  // Insert a [0,end] buffered range, to simulate Moof's being buffered
-  // via MSE.
-  auto len = b->resource->GetLength();
-  b->resource->MockAddBufferedRange(0, len);
-
-  // Rebuild the index so that it can be used to find the keyframes.
-  nsTArray<MediaByteRange> ranges;
-  EXPECT_TRUE(NS_SUCCEEDED(b->resource->GetCachedRanges(ranges)));
-  d->UpdateIndex(ranges);
-
-  // gizmp-frag has two keyframes; one at dts=cts=0, and another at
-  // dts=cts=1000000. Verify we get expected results.
-
-  MP4Sample* sample;
-  size_t i = 0;
-  const int64_t keyframe = 1000000;
-  while (!!(sample = d->DemuxVideoSample())) {
-    int64_t expected = (sample->decode_timestamp < keyframe) ? keyframe : -1;
-    EXPECT_EQ(d->GetNextKeyframeTime(), expected);
-    i++;
-  }
-}