Backed out changeset 9316add97cf2 (bug 1065827)
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Thu, 06 Nov 2014 14:59:02 +0100
changeset 214399 52f3406b70240caa1782ca91b29fbec9d71b9ecd
parent 214398 b5a32e677ac659b190937d5fb594a25b88bf2315
child 214400 7d7c5b4a91ff89b8a7acbb522c0f05d0de7fe309
push id27780
push userkwierso@gmail.com
push dateFri, 07 Nov 2014 02:25:05 +0000
treeherdermozilla-central@e6d47abb6a7b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1065827
milestone36.0a1
backs out9316add97cf2510b5bc01b552189f749538dae4b
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 9316add97cf2 (bug 1065827)
dom/media/test/test_reset_src.html
--- a/dom/media/test/test_reset_src.html
+++ b/dom/media/test/test_reset_src.html
@@ -21,17 +21,17 @@ href="https://bugzilla.mozilla.org/show_
 
 var manager = new MediaTestManager;
 
 function finish(v) {
   removeNodeAndSource(v);
   manager.finished(v.token);
 }
 
-function onLoadedData_Audio(e) {
+function onLoadedMetadata_Audio(e) {
   var t = e.target;
   is(t.videoHeight, 0, t.name + ": videoHeight should be zero when there is no video.");
   is(t.videoWidth, 0, t.name + ": videoWidth should be zero when there is no video.");
   is(t.mozPaintedFrames, 0, t.name + ": mozPaintedFrames should be zero when there is no video.");
   is(t.mozFrameDelay, 0, t.name + ": mozFrameDelay should be zero when there is no video.");
   var c = document.getElementsByTagName("canvas")[0].getContext("2d");
   try {
     c.drawImage(t, 0, 0, t.videoHeight, t.videoWidth);
@@ -57,40 +57,40 @@ function onTimeUpdate_Video(e) {
     t.src = t.src;
     t._firstTime = false;
   } else {
     var source = getPlayableAudio(gPlayTests);
     if (!source) {
       todo("No audio file available.")
       finish(t);
     } else {
-      t.removeEventListener("loadeddata", onLoadedData_Video);
-      t.addEventListener("loadeddata", onLoadedData_Audio);
+      t.removeEventListener("loadedmetadata", onLoadedMetadata_Video);
+      t.addEventListener("loadedmetadata", onLoadedMetadata_Audio);
       t.src = source.name;
     }
   }
 }
 
-function onLoadedData_Video(e) {
+function onLoadedMetadata_Video(e) {
   var t = e.target;
   isnot(t.videoHeight, 0, t.name + ": We should have a videoHeight.");
   isnot(t.videoWidth, 0, t.name + ": We should have a videoWidth.");
   t.addEventListener("timeupdate", onTimeUpdate_Video);
   t.play();
 }
 
 function startTest(test, token) {
   var v = document.createElement('video');
   document.body.appendChild(v);
+  v.preload = "metadata";
   v._firstTime = true;
-  v.addEventListener("loadeddata", onLoadedData_Video);
+  v.addEventListener("loadedmetadata", onLoadedMetadata_Video);
   v.src = test.name;
   v.token = token;
   v.name = test.name;
-  v.play();
   manager.started(token);
 }
 
 manager.runTests(getPlayableVideos(gSmallTests.concat(gSeekTests)), startTest);
 </script>
 </pre>
 </body>
 </html>