Backed out changeset 3193763d0a3b (bug 1069222) for M1 test failures
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Tue, 14 Oct 2014 12:39:08 +0200
changeset 210341 4414bcd4350e43118ecfc281ebd809ed1874a23a
parent 210340 872cd2c32ccf1340b5087cd5d0d9a9e0b70ecda0
child 210342 b17fa4f3eae4b9488ce4e8e06b7a995db93d7d76
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
bugs1069222
milestone36.0a1
backs out3193763d0a3bbe6bfca4a07f73802320e3b8ca07
Backed out changeset 3193763d0a3b (bug 1069222) for M1 test failures
content/media/test/test_imagecapture.html
--- a/content/media/test/test_imagecapture.html
+++ b/content/media/test/test_imagecapture.html
@@ -33,17 +33,16 @@ function gcTest(track) {
       };
       imageCapture.onerror = function(error) {
         ok(false, "takePhoto failure in gc testing");
         reject();
       };
 
       imageCapture.takePhoto();
     }
-    info("Call gc ");
     SpecialPowers.gc();
   });
 }
 
 // Continue calling takePhoto() in rapid succession.
 function rapidTest(track) {
   return new Promise(function(resolve, reject) {
     var imageCapture = new ImageCapture(track);
@@ -107,30 +106,18 @@ function trackTest(track) {
 
     track.enabled = false;
     imageCapture.takePhoto()
   });
 }
 
 function init() {
   return new Promise(function(resolve, reject) {
-    var constraints;
-    if (SpecialPowers.Services.appinfo.name == "B2G") {
-      info("B2G ImageCapture test");
-      // Reduce repeat count due to b2g emulator is very slow.
-      repeat = 20;
-      // Use gonk camera, MedieEngine will be the backend of ImageCapture.
-      constraints = {video: true};
-    } else {
-      // use fake camera, MediaStreamGraph will be the backend of ImageCapture.
-      constraints = {video: true, fake: true}
-    }
-
     window.navigator.mozGetUserMedia(
-      constraints,
+      {video: true, fake: true},
       function(stream) {
         var track = stream.getVideoTracks()[0];
         resolve(track);
       },
       function(err) {
         reject(err);
       }
     );
@@ -145,21 +132,20 @@ function start() {
     info("ImageCapture blob test.");
     return blobTest(track);
   }).then(function(track) {
     info("ImageCapture rapid takePhoto() test.");
     return rapidTest(track);
   }).then(function(track) {
     info("ImageCapture multiple instances test.");
     return gcTest(track);
-  }).then(SimpleTest.finish);
+  }).then(function() {
+    SimpleTest.finish();
+  });
 }
 
-SimpleTest.requestCompleteLog();
 SimpleTest.waitForExplicitFinish();
+SpecialPowers.pushPrefEnv({"set": [["dom.imagecapture.enabled", true]]}, start);
 
-SpecialPowers.pushPrefEnv({"set": [["dom.imagecapture.enabled", true],
-                                  ["media.navigator.permission.disabled", true]
-                                  ]}, start);
 </script>
 </pre>
 </body>
 </html>