Bug 1358030 - add mochitest for webrtc android remote h/w encoder. r?jolin, jib draft
authorMunro Mengjue Chiang <mchiang@mozilla.com>
Thu, 20 Apr 2017 14:54:55 +0800
changeset 567456 2ecdcc92a3955a91132c0bad68ad17930fb29153
parent 563802 a374c35469935a874fefe64d3e07003fc5bc8884
child 625654 2dfccbb0637d8701043cec514d7a4daa70e98a8f
push id55578
push userbmo:mchiang@mozilla.com
push dateTue, 25 Apr 2017 01:49:14 +0000
reviewersjolin, jib
bugs1358030
milestone55.0a1
Bug 1358030 - add mochitest for webrtc android remote h/w encoder. r?jolin, jib MozReview-Commit-ID: JCtWTNg89io
dom/media/tests/mochitest/mochitest.ini
dom/media/tests/mochitest/test_peerConnection_basicVideoRemoteHwEncoder.html
--- a/dom/media/tests/mochitest/mochitest.ini
+++ b/dom/media/tests/mochitest/mochitest.ini
@@ -115,16 +115,18 @@ skip-if = (android_version == '18') # an
 [test_peerConnection_basicAudioVideoNoBundle.html]
 skip-if = (android_version == '18') # android(Bug 1189784, timeouts on 4.3 emulator)
 [test_peerConnection_basicAudioVideoNoBundleNoRtcpMux.html]
 skip-if = android_version == '18' # android(Bug 1189784, timeouts on 4.3 emulator)
 [test_peerConnection_basicAudioVideoNoRtcpMux.html]
 skip-if = android_version == '18' # android(Bug 1189784, timeouts on 4.3 emulator)
 [test_peerConnection_basicVideo.html]
 skip-if = (android_version == '18' && debug) # android(Bug 1189784, timeouts on 4.3 emulator)
+[test_peerConnection_basicVideoRemoteHwEncoder.html]
+skip-if = os == 'linux' || os == 'mac' || os == 'win' || (android_version == '18' && debug) # android-specific feature. android(Bug 1189784, timeouts on 4.3 emulator)
 [test_peerConnection_basicScreenshare.html]
 # frequent timeouts/crashes on e10s (bug 1048455)
 skip-if = toolkit == 'android' # no screenshare on android
 [test_peerConnection_basicWindowshare.html]
 # frequent timeouts/crashes on e10s (bug 1048455)
 skip-if = toolkit == 'android' # no screenshare on android
 [test_peerConnection_basicH264Video.html]
 skip-if = os == 'android' # bug 1043403
new file mode 100644
--- /dev/null
+++ b/dom/media/tests/mochitest/test_peerConnection_basicVideoRemoteHwEncoder.html
@@ -0,0 +1,31 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+  <script type="application/javascript" src="pc.js"></script>
+</head>
+<body>
+<pre id="test">
+<script type="application/javascript">
+  createHTML({
+    bug: "1265755",
+    title: "Basic video peer connection with android oop hw encoder"
+  });
+
+  runNetworkTest(options => {
+    SpecialPowers.pushPrefEnv(
+      {
+        set: [
+          ['media.navigator.hardware.vp8_encode.acceleration_enabled', true],
+          ['media.navigator.hardware.vp8_encode.acceleration_remote_enabled', true]
+        ]
+      }, function (options = {}) {
+        var test = new PeerConnectionTest(options);
+        test.setMediaConstraints([{video: true}],
+                                 [{video: true}]);
+        test.run();
+      })
+  });
+</script>
+</pre>
+</body>
+</html>