Bug 1417011 - move mp4 gtest. r=kinetik
authorAlfredo.Yang <ayang@mozilla.com>
Wed, 15 Nov 2017 14:26:18 +0800
changeset 392105 4434b40053770c809d51e4ff9060e0aacc250f69
parent 392104 874157f43b66c435a70f4cd1225716dc7f45df48
child 392106 fac2ad4b4229a8b445b6a4500c4caad91b8db2ea
push id32910
push userrgurzau@mozilla.com
push dateThu, 16 Nov 2017 10:02:59 +0000
treeherdermozilla-central@9941e68b5a53 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskinetik
bugs1417011
milestone59.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1417011 - move mp4 gtest. r=kinetik MozReview-Commit-ID: DO4HknJLE5K
dom/media/gtest/moz.build
dom/media/gtest/mp4_demuxer/TestInterval.cpp
dom/media/gtest/mp4_demuxer/TestMP4.cpp
dom/media/gtest/mp4_demuxer/TestParser.cpp
dom/media/gtest/mp4_demuxer/moz.build
dom/media/gtest/mp4_demuxer/test_case_1156505.mp4
dom/media/gtest/mp4_demuxer/test_case_1181213.mp4
dom/media/gtest/mp4_demuxer/test_case_1181215.mp4
dom/media/gtest/mp4_demuxer/test_case_1181220.mp4
dom/media/gtest/mp4_demuxer/test_case_1181223.mp4
dom/media/gtest/mp4_demuxer/test_case_1181719.mp4
dom/media/gtest/mp4_demuxer/test_case_1185230.mp4
dom/media/gtest/mp4_demuxer/test_case_1187067.mp4
dom/media/gtest/mp4_demuxer/test_case_1200326.mp4
dom/media/gtest/mp4_demuxer/test_case_1204580.mp4
dom/media/gtest/mp4_demuxer/test_case_1216748.mp4
dom/media/gtest/mp4_demuxer/test_case_1296473.mp4
dom/media/gtest/mp4_demuxer/test_case_1296532.mp4
dom/media/gtest/mp4_demuxer/test_case_1301065-harder.mp4
dom/media/gtest/mp4_demuxer/test_case_1301065-i64max.mp4
dom/media/gtest/mp4_demuxer/test_case_1301065-i64min.mp4
dom/media/gtest/mp4_demuxer/test_case_1301065-max-ez.mp4
dom/media/gtest/mp4_demuxer/test_case_1301065-max-ok.mp4
dom/media/gtest/mp4_demuxer/test_case_1301065-overfl.mp4
dom/media/gtest/mp4_demuxer/test_case_1301065-u32max.mp4
dom/media/gtest/mp4_demuxer/test_case_1301065-u64max.mp4
dom/media/gtest/mp4_demuxer/test_case_1301065.mp4
dom/media/gtest/mp4_demuxer/test_case_1329061.mov
dom/media/gtest/mp4_demuxer/test_case_1351094.mp4
dom/media/gtest/mp4_demuxer/test_case_1380468.mp4
dom/media/gtest/mp4_demuxer/test_case_1388991.mp4
dom/media/gtest/mp4_demuxer/test_case_1389299.mp4
dom/media/gtest/mp4_demuxer/test_case_1389527.mp4
dom/media/gtest/mp4_demuxer/test_case_1395244.mp4
dom/media/gtest/mp4_demuxer/test_case_1410565.mp4
media/libstagefright/gtest/TestInterval.cpp
media/libstagefright/gtest/TestMP4Rust.cpp
media/libstagefright/gtest/TestParser.cpp
media/libstagefright/gtest/moz.build
media/libstagefright/gtest/test_case_1156505.mp4
media/libstagefright/gtest/test_case_1181213.mp4
media/libstagefright/gtest/test_case_1181215.mp4
media/libstagefright/gtest/test_case_1181220.mp4
media/libstagefright/gtest/test_case_1181223.mp4
media/libstagefright/gtest/test_case_1181719.mp4
media/libstagefright/gtest/test_case_1185230.mp4
media/libstagefright/gtest/test_case_1187067.mp4
media/libstagefright/gtest/test_case_1200326.mp4
media/libstagefright/gtest/test_case_1204580.mp4
media/libstagefright/gtest/test_case_1216748.mp4
media/libstagefright/gtest/test_case_1296473.mp4
media/libstagefright/gtest/test_case_1296532.mp4
media/libstagefright/gtest/test_case_1301065-harder.mp4
media/libstagefright/gtest/test_case_1301065-i64max.mp4
media/libstagefright/gtest/test_case_1301065-i64min.mp4
media/libstagefright/gtest/test_case_1301065-max-ez.mp4
media/libstagefright/gtest/test_case_1301065-max-ok.mp4
media/libstagefright/gtest/test_case_1301065-overfl.mp4
media/libstagefright/gtest/test_case_1301065-u32max.mp4
media/libstagefright/gtest/test_case_1301065-u64max.mp4
media/libstagefright/gtest/test_case_1301065.mp4
media/libstagefright/gtest/test_case_1329061.mov
media/libstagefright/gtest/test_case_1351094.mp4
media/libstagefright/gtest/test_case_1380468.mp4
media/libstagefright/gtest/test_case_1388991.mp4
media/libstagefright/gtest/test_case_1389299.mp4
media/libstagefright/gtest/test_case_1389527.mp4
media/libstagefright/gtest/test_case_1395244.mp4
media/libstagefright/gtest/test_case_1410565.mp4
media/libstagefright/moz.build
--- a/dom/media/gtest/moz.build
+++ b/dom/media/gtest/moz.build
@@ -51,16 +51,20 @@ TEST_HARNESS_FILES.gtest += [
     'small-shot-partial-xing.mp3',
     'small-shot.mp3',
     'test.webm',
     'test_case_1224361.vp8.ivf',
     'test_case_1224363.vp8.ivf',
     'test_case_1224369.vp8.ivf',
 ]
 
+TEST_DIRS += [
+    'mp4_demuxer',
+]
+
 include('/ipc/chromium/chromium-config.mozbuild')
 
 LOCAL_INCLUDES += [
     '/dom/media',
     '/dom/media/encoder',
     '/dom/media/gmp',
     '/dom/media/mp4',
     '/dom/media/platforms',
rename from media/libstagefright/gtest/TestInterval.cpp
rename to dom/media/gtest/mp4_demuxer/TestInterval.cpp
rename from media/libstagefright/gtest/TestMP4Rust.cpp
rename to dom/media/gtest/mp4_demuxer/TestMP4.cpp
rename from media/libstagefright/gtest/TestParser.cpp
rename to dom/media/gtest/mp4_demuxer/TestParser.cpp
--- a/media/libstagefright/gtest/TestParser.cpp
+++ b/dom/media/gtest/mp4_demuxer/TestParser.cpp
@@ -67,17 +67,17 @@ protected:
   virtual ~TestStream()
   {
   }
 
   const uint8_t* mBuffer;
   size_t mSize;
 };
 
-TEST(stagefright_MP4Metadata, EmptyStream)
+TEST(MP4Metadata, EmptyStream)
 {
   RefPtr<Stream> stream = new TestStream(nullptr, 0);
 
   MP4Metadata::ResultAndByteBuffer metadataBuffer =
     MP4Metadata::Metadata(stream);
   EXPECT_TRUE(NS_OK != metadataBuffer.Result());
   EXPECT_FALSE(static_cast<bool>(metadataBuffer.Ref()));
 
@@ -93,17 +93,17 @@ TEST(stagefright_MP4Metadata, EmptyStrea
   EXPECT_FALSE(metadata.GetTrackInfo(TrackInfo::kAudioTrack, 0).Ref());
   EXPECT_FALSE(metadata.GetTrackInfo(TrackInfo::kVideoTrack, 0).Ref());
   EXPECT_FALSE(metadata.GetTrackInfo(TrackInfo::kTextTrack, 0).Ref());
   // We can seek anywhere in any MPEG4.
   EXPECT_TRUE(metadata.CanSeek());
   EXPECT_FALSE(metadata.Crypto().Ref()->valid);
 }
 
-TEST(stagefright_MoofParser, EmptyStream)
+TEST(MoofParser, EmptyStream)
 {
   RefPtr<Stream> stream = new TestStream(nullptr, 0);
 
   MoofParser parser(stream, 0, false);
   EXPECT_EQ(0u, parser.mOffset);
   EXPECT_TRUE(parser.ReachedEnd());
 
   MediaByteRangeSet byteRanges;
@@ -228,17 +228,17 @@ static const TestFileData testFiles[] = 
                                             80, 128, 1, 4992000, false,   0, false, false, 2 },
   { "test_case_1395244.mp4",        true, 1, true, 416666,
                                            320, 240, 1,477460, false,0, false, false, 2 },
   { "test_case_1388991.mp4",        true, 0, false, -1, 0, 0, 1, 30000181, false, 0, false, false, 2 },
   { "test_case_1380468.mp4",        false, 0, false,  0,   0,   0, 0,  0, false,   0, false, false, 0 },
   { "test_case_1410565.mp4",        false, 0, false, 0, 0, 0, 0, 0, false, 955100, true, true, 2 },    // negative 'timescale'
 };
 
-TEST(stagefright_MPEG4Metadata, test_case_mp4)
+TEST(MP4Metadata, test_case_mp4)
 {
   const TestFileData* tests = nullptr;
   size_t length = 0;
 
   tests = testFiles;
   length = ArrayLength(testFiles);
 
   for (size_t test = 0; test < length; ++test) {
@@ -329,17 +329,17 @@ TEST(stagefright_MPEG4Metadata, test_cas
     // We can see anywhere in any MPEG4.
     EXPECT_TRUE(metadata.CanSeek()) << tests[test].mFilename;
     EXPECT_EQ(tests[test].mHasCrypto, metadata.Crypto().Ref()->valid) << tests[test].mFilename;
   }
 }
 
 // Bug 1224019: This test produces way to much output, disabling for now.
 #if 0
-TEST(stagefright_MPEG4Metadata, test_case_mp4_subsets)
+TEST(MPEG4Metadata, test_case_mp4_subsets)
 {
   static const size_t step = 1u;
   for (size_t test = 0; test < ArrayLength(testFiles); ++test) {
     nsTArray<uint8_t> buffer = ReadTestFile(testFiles[test].mFilename);
     ASSERT_FALSE(buffer.IsEmpty());
     ASSERT_LE(step, buffer.Length());
     // Just exercizing the parser starting at different points through the file,
     // making sure it doesn't crash.
@@ -366,17 +366,17 @@ TEST(stagefright_MPEG4Metadata, test_cas
           size -= 1;
         }
       }
     }
   }
 }
 #endif
 
-TEST(stagefright_MoofParser, test_case_mp4)
+TEST(MoofParser, test_case_mp4)
 {
   const TestFileData* tests = nullptr;
   size_t length = 0;
 
   tests = testFiles;
   length = ArrayLength(testFiles);
 
   for (size_t test = 0; test < length; ++test) {
@@ -411,17 +411,17 @@ TEST(stagefright_MoofParser, test_case_m
     EXPECT_TRUE(parser.FirstCompleteMediaSegment().IsEmpty()) << tests[test].mFilename;
     EXPECT_EQ(tests[test].mHeader,
               !parser.FirstCompleteMediaHeader().IsEmpty()) << tests[test].mFilename;
   }
 }
 
 // Bug 1224019: This test produces way to much output, disabling for now.
 #if 0
-TEST(stagefright_MoofParser, test_case_mp4_subsets)
+TEST(MoofParser, test_case_mp4_subsets)
 {
   const size_t step = 1u;
   for (size_t test = 0; test < ArrayLength(testFiles); ++test) {
     nsTArray<uint8_t> buffer = ReadTestFile(testFiles[test].mFilename);
     ASSERT_FALSE(buffer.IsEmpty());
     ASSERT_LE(step, buffer.Length());
     // Just exercizing the parser starting at different points through the file,
     // making sure it doesn't crash.
@@ -521,17 +521,17 @@ uint8_t media_gtest_video_init_mp4[] = {
   0x00, 0x00, 0x05, 0x76, 0x18, 0x00, 0x00, 0x00, 0x20, 0x74, 0x72, 0x65,
   0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
   0x01, 0x00, 0x00, 0x03, 0xe8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
   0x00
 };
 
 const uint32_t media_gtest_video_init_mp4_len = 745;
 
-TEST(stagefright_MP4Metadata, EmptyCTTS)
+TEST(MP4Metadata, EmptyCTTS)
 {
   RefPtr<MediaByteBuffer> buffer = new MediaByteBuffer(media_gtest_video_init_mp4_len);
   buffer->AppendElements(media_gtest_video_init_mp4, media_gtest_video_init_mp4_len);
   RefPtr<BufferStream> stream = new BufferStream(buffer);
 
   MP4Metadata::ResultAndByteBuffer metadataBuffer =
     MP4Metadata::Metadata(stream);
   EXPECT_EQ(NS_OK, metadataBuffer.Result());
rename from media/libstagefright/gtest/moz.build
rename to dom/media/gtest/mp4_demuxer/moz.build
--- a/media/libstagefright/gtest/moz.build
+++ b/dom/media/gtest/mp4_demuxer/moz.build
@@ -1,15 +1,15 @@
 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-Library('stagefright_gtest')
+Library('mp4_demuxer_gtest')
 
 SOURCES += [
     'TestInterval.cpp',
     'TestParser.cpp',
 ]
 
 TEST_HARNESS_FILES.gtest += [
     'test_case_1156505.mp4',
@@ -39,17 +39,17 @@ TEST_HARNESS_FILES.gtest += [
     'test_case_1380468.mp4',
     'test_case_1388991.mp4',
     'test_case_1389299.mp4',
     'test_case_1389527.mp4',
     'test_case_1395244.mp4',
     'test_case_1410565.mp4',
 ]
 
-UNIFIED_SOURCES += ['TestMP4Rust.cpp',]
+UNIFIED_SOURCES += ['TestMP4.cpp',]
 TEST_HARNESS_FILES.gtest += [
-    '../../../dom/media/test/street.mp4',
+    '../../test/street.mp4',
 ]
 LOCAL_INCLUDES += [
-    '../binding/include',
+    '../../mp4',
 ]
 
 FINAL_LIBRARY = 'xul-gtest'
rename from media/libstagefright/gtest/test_case_1156505.mp4
rename to dom/media/gtest/mp4_demuxer/test_case_1156505.mp4
rename from media/libstagefright/gtest/test_case_1181213.mp4
rename to dom/media/gtest/mp4_demuxer/test_case_1181213.mp4
rename from media/libstagefright/gtest/test_case_1181215.mp4
rename to dom/media/gtest/mp4_demuxer/test_case_1181215.mp4
rename from media/libstagefright/gtest/test_case_1181220.mp4
rename to dom/media/gtest/mp4_demuxer/test_case_1181220.mp4
rename from media/libstagefright/gtest/test_case_1181223.mp4
rename to dom/media/gtest/mp4_demuxer/test_case_1181223.mp4
rename from media/libstagefright/gtest/test_case_1181719.mp4
rename to dom/media/gtest/mp4_demuxer/test_case_1181719.mp4
rename from media/libstagefright/gtest/test_case_1185230.mp4
rename to dom/media/gtest/mp4_demuxer/test_case_1185230.mp4
rename from media/libstagefright/gtest/test_case_1187067.mp4
rename to dom/media/gtest/mp4_demuxer/test_case_1187067.mp4
rename from media/libstagefright/gtest/test_case_1200326.mp4
rename to dom/media/gtest/mp4_demuxer/test_case_1200326.mp4
rename from media/libstagefright/gtest/test_case_1204580.mp4
rename to dom/media/gtest/mp4_demuxer/test_case_1204580.mp4
rename from media/libstagefright/gtest/test_case_1216748.mp4
rename to dom/media/gtest/mp4_demuxer/test_case_1216748.mp4
rename from media/libstagefright/gtest/test_case_1296473.mp4
rename to dom/media/gtest/mp4_demuxer/test_case_1296473.mp4
rename from media/libstagefright/gtest/test_case_1296532.mp4
rename to dom/media/gtest/mp4_demuxer/test_case_1296532.mp4
rename from media/libstagefright/gtest/test_case_1301065-harder.mp4
rename to dom/media/gtest/mp4_demuxer/test_case_1301065-harder.mp4
rename from media/libstagefright/gtest/test_case_1301065-i64max.mp4
rename to dom/media/gtest/mp4_demuxer/test_case_1301065-i64max.mp4
rename from media/libstagefright/gtest/test_case_1301065-i64min.mp4
rename to dom/media/gtest/mp4_demuxer/test_case_1301065-i64min.mp4
rename from media/libstagefright/gtest/test_case_1301065-max-ez.mp4
rename to dom/media/gtest/mp4_demuxer/test_case_1301065-max-ez.mp4
rename from media/libstagefright/gtest/test_case_1301065-max-ok.mp4
rename to dom/media/gtest/mp4_demuxer/test_case_1301065-max-ok.mp4
rename from media/libstagefright/gtest/test_case_1301065-overfl.mp4
rename to dom/media/gtest/mp4_demuxer/test_case_1301065-overfl.mp4
rename from media/libstagefright/gtest/test_case_1301065-u32max.mp4
rename to dom/media/gtest/mp4_demuxer/test_case_1301065-u32max.mp4
rename from media/libstagefright/gtest/test_case_1301065-u64max.mp4
rename to dom/media/gtest/mp4_demuxer/test_case_1301065-u64max.mp4
rename from media/libstagefright/gtest/test_case_1301065.mp4
rename to dom/media/gtest/mp4_demuxer/test_case_1301065.mp4
rename from media/libstagefright/gtest/test_case_1329061.mov
rename to dom/media/gtest/mp4_demuxer/test_case_1329061.mov
rename from media/libstagefright/gtest/test_case_1351094.mp4
rename to dom/media/gtest/mp4_demuxer/test_case_1351094.mp4
rename from media/libstagefright/gtest/test_case_1380468.mp4
rename to dom/media/gtest/mp4_demuxer/test_case_1380468.mp4
rename from media/libstagefright/gtest/test_case_1388991.mp4
rename to dom/media/gtest/mp4_demuxer/test_case_1388991.mp4
rename from media/libstagefright/gtest/test_case_1389299.mp4
rename to dom/media/gtest/mp4_demuxer/test_case_1389299.mp4
rename from media/libstagefright/gtest/test_case_1389527.mp4
rename to dom/media/gtest/mp4_demuxer/test_case_1389527.mp4
rename from media/libstagefright/gtest/test_case_1395244.mp4
rename to dom/media/gtest/mp4_demuxer/test_case_1395244.mp4
rename from media/libstagefright/gtest/test_case_1410565.mp4
rename to dom/media/gtest/mp4_demuxer/test_case_1410565.mp4
--- a/media/libstagefright/moz.build
+++ b/media/libstagefright/moz.build
@@ -10,20 +10,16 @@ with Files("**"):
 EXPORTS.demuxer += [
     'binding/include/demuxer/TrackDemuxer.h',
 ]
 
 LOCAL_INCLUDES += [
     'binding/include',
 ]
 
-TEST_DIRS += [
-    'gtest',
-]
-
 FINAL_LIBRARY = 'xul'
 
 # Suppress warnings in third-party code.
 if CONFIG['_MSC_VER']:
     CFLAGS += [
         '-wd4013', # 'function' undefined; assuming extern returning int
         '-wd4101', # unreferenced local variable
     ]