Backed out changeset 3ff9374610b7 (bug 1016413)
authorEd Morley <emorley@mozilla.com>
Thu, 19 Jun 2014 16:34:42 +0100
changeset 189616 11c7ff019582deefe823b1eb892355c83f04cdb5
parent 189615 3ff9374610b71410b65fc44b01200559953eaca4
child 189617 aa52cfb29acbcfb650d8642a244487d19bc2419c
push id26992
push userkwierso@gmail.com
push dateFri, 20 Jun 2014 01:07:53 +0000
treeherdermozilla-central@bdac18bd6c74 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1016413
milestone33.0a1
backs out3ff9374610b71410b65fc44b01200559953eaca4
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
Backed out changeset 3ff9374610b7 (bug 1016413)
content/media/test/gizmo.metadata.mp4
content/media/test/manifest.js
content/media/test/mochitest.ini
content/media/test/test_metadata.html
deleted file mode 100644
index 997f03644c7b5a0c3034621319849237fc8756ba..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
--- a/content/media/test/manifest.js
+++ b/content/media/test/manifest.js
@@ -481,144 +481,100 @@ var gChainingTests = [
 var gAspectRatioTests = [
   { name:"VID_0001.ogg", type:"video/ogg", duration:19.966 }
 ];
 
 // These are files with non-trivial tag sets.
 // Used by test_metadata.html.
 var gMetadataTests = [
   // Ogg Vorbis files
-  { name:"short-video.ogv",
-    type:"video/ogg",
-    tags: {
+  { name:"short-video.ogv", tags: {
       TITLE:"Lepidoptera",
       ARTIST:"Epoq",
       ALBUM:"Kahvi Collective",
       DATE:"2002",
       COMMENT:"http://www.kahvi.org",
     }
   },
-  { name:"bug516323.ogv",
-    type:"video/ogg",
-    tags: {
+  { name:"bug516323.ogv", tags: {
       GENRE:"Open Movie",
       ENCODER:"Audacity",
       TITLE:"Elephants Dream",
       ARTIST:"Silvia Pfeiffer",
       COMMENTS:"Audio Description"
     }
   },
-  { name:"bug516323.indexed.ogv",
-    type:"video/ogg",
-    tags: {
+  { name:"bug516323.indexed.ogv", tags: {
       GENRE:"Open Movie",
       ENCODER:"Audacity",
       TITLE:"Elephants Dream",
       ARTIST:"Silvia Pfeiffer",
       COMMENTS:"Audio Description"
     }
   },
-  { name:"detodos.opus",
-    type:"audio/ogg; codecs=opus",
-    tags: {
+  { name:"detodos.opus", tags: {
       title:"De todos. Para todos.",
       artist:"Mozilla.org"
     }
   },
-  { name:"sound.ogg",
-    type:"audio/ogg",
-    tags: { }
-  },
-  { name:"small-shot.ogg",
-    type:"video/ogg",
-    tags: {
+  { name:"sound.ogg", tags: { } },
+  { name:"small-shot.ogg", tags: {
       title:"Pew SFX"
     }
   },
-  { name:"badtags.ogg",
-    type:"audio/ogg",
-    tags: {
+  { name:"badtags.ogg", tags: {
       // We list only the valid tags here, and verify
       // the invalid ones are filtered out.
       title:"Invalid comments test file",
       empty:"",
       "":"empty",
       "{- [(`!@\"#$%^&')] -}":"valid tag name, surprisingly"
       // The file also includes the following invalid tags.
       // "A description with no separator is a common problem.",
       // "雨":"Likely, but an invalid key (non-ascii).",
       // "not\nval\x1fid":"invalid tag name",
       // "not~valid":"this isn't a valid name either",
       // "not-utf-8":"invalid sequences: \xff\xfe\xfa\xfb\0eol"
     }
   },
-  { name:"wave_metadata.wav",
-    type:"audio/x-wav",
-    tags: {
+  { name:"wave_metadata.wav", tags: {
       name:"Track Title",
       artist:"Artist Name",
       comments:"Comments",
     }
   },
-  { name:"wave_metadata_utf8.wav",
-    type:"audio/x-wav",
-    tags: {
+  { name:"wave_metadata_utf8.wav", tags: {
       name:"歌曲名稱",
       artist:"作曲者",
       comments:"註解",
     }
   },
-  { name:"wave_metadata_unknown_tag.wav",
-    type:"audio/x-wav",
-    tags: {
+  { name:"wave_metadata_unknown_tag.wav", tags: {
       name:"Track Title",
       comments:"Comments",
     }
   },
-  { name:"wave_metadata_bad_len.wav",
-    type:"audio/x-wav",
-    tags: {
+  { name:"wave_metadata_bad_len.wav", tags: {
       name:"Track Title",
       artist:"Artist Name",
     }
   },
-  { name:"wave_metadata_bad_no_null.wav",
-    type:"audio/x-wav",
-    tags: {
+  { name:"wave_metadata_bad_no_null.wav", tags: {
       name:"Track Title",
       artist:"Artist Name",
       comments:"Comments!!",
     }
   },
-  { name:"wave_metadata_bad_utf8.wav",
-    type:"audio/x-wav",
-    tags: {
+  { name:"wave_metadata_bad_utf8.wav", tags: {
       name:"歌曲名稱",
       comments:"註解",
     }
   },
-  { name:"wavedata_u8.wav",
-    type:"audio/x-wav",
-    tags: { }
+  { name:"wavedata_u8.wav", tags: { }
   },
-  { name:"gizmo.metadata.mp4",
-    type:"video/mp4",
-    tags: {
-      artist:"Artist name",
-      title:"Title name",
-      album:"Album name",
-      albumArtist:"Album Artist name",
-      genre:"Genre name",
-      date:"20140326T002053.000Z",
-      year:"2014",
-      writer:"Composer name",
-      discNumber:"1/0",
-      cdTrackNumber:"1/0"
-    }
-  }
 ];
 
 function checkMetadata(msg, e, test) {
   if (test.width) {
     is(e.videoWidth, test.width, msg + " video width");
   }
   if (test.height) {
     is(e.videoHeight, test.height, msg + " video height");
--- a/content/media/test/mochitest.ini
+++ b/content/media/test/mochitest.ini
@@ -139,17 +139,16 @@ support-files =
   detodos.webm^headers^
   dirac.ogg
   dirac.ogg^headers^
   dynamic_redirect.sjs
   dynamic_resource.sjs
   file_access_controls.html
   fragment_noplay.js
   fragment_play.js
-  gizmo.metadata.mp4
   gizmo.mp4
   gizmo.mp4^headers^
   huge-id3.mp3
   huge-id3.mp3^headers^
   id3tags.mp3
   id3tags.mp3^headers^
   invalid-cmap-s0c0.opus
   invalid-cmap-s0c0.opus^headers^
--- a/content/media/test/test_metadata.html
+++ b/content/media/test/test_metadata.html
@@ -8,44 +8,40 @@
   <script type="text/javascript" src="manifest.js"></script>
 </head>
 <body>
 <pre id="test">
 <div id="output"></div>
 <script class="testbody" type="text/javascript">
 
 var manager = new MediaTestManager;
-SimpleTest.waitForExplicitFinish();
-SpecialPowers.pushPrefEnv({
-        'set': [
-        ["media.fragmented-mp4.ffmpeg.enabled", true],
-        ["media.fragmented-mp4.exposed", true]
-        ]
-}, beginTest);
 
-function isMP4(value) {
-  return value === "mp4" || value === "x-m4a";
-}
+function startTest(test, token) {
+  var a = document.createElement('audio');
+  a.preload = "auto";
+  a.token = token;
+  manager.started(token);
+
+  a.src = test.name;
+  a.name = test.name;
 
-// Returns true if mp4 metadata reporting shall not be tested on the current platform
-function MP4isNotTested() {
-  return !(
-  navigator.userAgent.indexOf("Linux") != -1 || // Linux
-  navigator.userAgent.indexOf("Windows NT 6.1") != -1 || // Windows 7
-  navigator.userAgent.indexOf("Windows NT 6.2") != -1 // Windows 8
-  );
-}
+  // Tags should not be available immediately.
+  var exception_fired = false;
+  try {
+    var m = a.mozGetMetadata();
+  } catch (e) {
+    is(e.name, 'InvalidStateError',
+       "early mozGetMetadata() should throw InvalidStateError");
+    exception_fired = true;
+  }
+  ok(exception_fired,
+     "mozGetMetadata() should throw an exception before HAVE_METADATA");
 
-function beginTest() {
-  manager.runTests(gMetadataTests, startTest);
-}
-
-function checkTags(event) {
-    var a = event.target;
-    var test = a.value;
+  // Wait until metadata has loaded.
+  a.addEventListener('loadedmetadata', function() {
     // read decoded tags
     tags = a.mozGetMetadata();
     ok(tags, "mozGetMetadata() should return a truthy value");
     // Dump them out.
     var d = document.getElementById('output');
     var html = '<table>\n';
     html += '<caption><p>Called getMozMetadata()'
     html += ' on '+test.name+'</p></caption>\n';
@@ -67,48 +63,18 @@ function checkTags(event) {
     // Verify decoded tag values.
     for (tag in tags) {
       is(tags[tag], test.tags[tag], "Tag '"+tag+"' should match");
     }
     // Verify expected tag values
     for (tag in test.tags) {
       is(tags[tag], test.tags[tag], "Tag '"+tag+"' should match");
     }
-    manager.finished(a.token);
-
+    manager.finished(token);
+  }, false);
 }
 
-function startTest(test, token) {
-
-  // Tests on MP4 are restricted to certain platforms
-  var format = test.type.split('/')[1];
-  if (isMP4(format) && MP4isNotTested()) {
-    return;
-  }
-
-  var a = document.createElement(getMajorMimeType(test.type));
-  a.preload = "auto";
-  a.token = token;
-  manager.started(token);
-  a.src = test.name;
-  a.name = test.name;
-  a.value = test;
-
-  // Tags should not be available immediately.
-  var exception_fired = false;
-  try {
-    var m = a.mozGetMetadata();
-  } catch (e) {
-    is(e.name, 'InvalidStateError',
-       "early mozGetMetadata() should throw InvalidStateError");
-    exception_fired = true;
-  }
-  ok(exception_fired,
-     "mozGetMetadata() should throw an exception before HAVE_METADATA");
-
-  // Wait until metadata has loaded.
-  a.addEventListener('loadedmetadata', checkTags, false);
-}
+manager.runTests(gMetadataTests, startTest);
 
 </script>
 </pre>
 </body>
 </html>