Backout of c7ea3c8c8375
authorDoug Turner <doug.turner@gmail.com>
Thu, 31 Oct 2013 22:30:25 -0700
changeset 166341 cd77e66d77f0f266dfa66a6f59ef3fa5e02cb27b
parent 166340 175925fa023b50831dccc0605c23c92ece71ec8a
child 166342 e79c434c717001663bfaa6313019649806b24601
push id3066
push userakeybl@mozilla.com
push dateMon, 09 Dec 2013 19:58:46 +0000
treeherdermozilla-beta@a31a0dce83aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone27.0a2
backs outc7ea3c8c837587a82510b7b5812ddb75ee583f7d
Backout of c7ea3c8c8375
dom/media/tests/mochitest/Makefile.in
dom/media/tests/mochitest/test_getUserMedia_permission.html
--- a/dom/media/tests/mochitest/Makefile.in
+++ b/dom/media/tests/mochitest/Makefile.in
@@ -2,14 +2,8 @@
 # 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/.
 
 # The following tests are leaking and cannot be run by default yet
 ifdef MOZ_WEBRTC_LEAKING_TESTS
 MOCHITEST_FILES += \
   $(NULL)
 endif
-
-ifdef MOZ_B2G_CAMERA
-MOCHITEST_FILES += \
-  test_getUserMedia_permission.html \
-  $(NULL)
-endif
deleted file mode 100644
--- a/dom/media/tests/mochitest/test_getUserMedia_permission.html
+++ /dev/null
@@ -1,77 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=853356
--->
-<head>
-  <meta charset="utf-8">
-  <title>mozGetUserMedia Permission Test</title>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <script type="application/javascript" src="head.js"></script>
-  <script type="application/javascript" src="mediaStreamPlayback.js"></script>
-</head>
-<body>
-<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=853356">Display camera/microphone permission acquisition prompt</a>
-<script type="application/javascript">
-var MockPermissionPrompt = SpecialPowers.MockPermissionPrompt;
-MockPermissionPrompt.init();
-
-var gCount = 0;
-var gTests = [
-  {
-    constraints: {video: true, audio: false}
-  }
-  ,
-  {
-    constraints: {video: false, audio: true}
-  }
-  ,
-  {
-    constraints: {video: true, audio: true},
-  }
-  ];
-
-function gUM(data) {
-  var gum_success = function (stream) {
-    SimpleTest.info("TEST-INFO | Got succss callback for " + JSON.stringify(data.constraints));
-
-    var hasAudioTrack = stream.getAudioTracks().length > 0;
-    var hasVideoTrack = stream.getVideoTracks().length > 0;
-
-    is(data.constraints.audio, hasAudioTrack, "Request audio track:" +
-                  data.constraints.audio + " contain audio track:" + hasAudioTrack);
-    is(data.constraints.video, hasVideoTrack, "Request video track:" +
-                  data.constraints.video + " contain audio track:" + hasVideoTrack);
-    gCount++;
-    if (gCount < gTests.length) {
-      gUM(gTests[gCount]);
-    } else {
-      SimpleTest.finish();
-    }
-  }
-
-  var gum_fail = function () {
-    ok(false, "permission not granted for " + JSON.stringify(data.constraints));
-
-    SimpleTest.finish();
-  }
-
-  SimpleTest.info("TEST-INFO | Call getUserMedia for " + JSON.stringify(data.constraints));
-  navigator.mozGetUserMedia(data.constraints, gum_success, gum_fail);
-}
-
-SpecialPowers.pushPrefEnv({"set": [["media.navigator.permission.disabled", false]]},
-  function () {
-    SpecialPowers.addPermission('video-capture',
-                                Ci.nsIPermissionManager.ALLOW_ACTION, document);
-    SpecialPowers.addPermission('audio-capture',
-                                Ci.nsIPermissionManager.ALLOW_ACTION, document);
-
-    gUM(gTests[gCount]);
-  });
-SimpleTest.waitForExplicitFinish();
-</script>
-</pre>
-</body>
-</html>