Bug 818466 - Enable basic automated WebRTC gUM tests on Android. r=jesup
--- a/dom/media/tests/mochitest/Makefile.in
+++ b/dom/media/tests/mochitest/Makefile.in
@@ -5,26 +5,26 @@
DEPTH = @DEPTH@
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
relativesrcdir = @relativesrcdir@
include $(DEPTH)/config/autoconf.mk
-# Bug 814718 and bug 818466 prevent us from running the following tests:
+# Bug 814718 prevents us from running the following test:
# test_getUserMedia_basicVideo.html
-# test_getUserMedia_basicAudio.html
-# test_getUserMedia_basicVideoAudio.html
MOCHITEST_FILES = \
test_getUserMedia_exceptions.html \
head.js \
mediaStreamPlayback.js \
$(NULL)
# The following tests are leaking and cannot be run by default yet
ifdef MOZ_WEBRTC_LEAKING_TESTS
MOCHITEST_FILES += \
+ test_getUserMedia_basicAudio.html \
+ test_getUserMedia_basicVideoAudio.html \
$(NULL)
endif
include $(topsrcdir)/config/rules.mk
--- a/dom/media/tests/mochitest/head.js
+++ b/dom/media/tests/mochitest/head.js
@@ -14,19 +14,19 @@ var Cr = SpecialPowers.Cr;
* @param {Boolean} desktopSupportedOnly specifies if the test currently
* is known to work on desktop only
*/
function runTest(aCallback, desktopSupportedOnly) {
SimpleTest.waitForExplicitFinish();
// If this is a desktop supported test and we're on android or b2g,
// indicate that the test is not supported and skip the test
- if(desktopSupportedOnly && (navigator.platform === 'Android' ||
+ if(desktopSupportedOnly && (navigator.userAgent.indexOf('Android') > -1 ||
navigator.platform === '')) {
- ok(true, navigator.platform + ' currently not supported');
+ ok(true, navigator.userAgent + ' currently not supported');
SimpleTest.finish();
} else {
SpecialPowers.pushPrefEnv({'set': [['media.peerconnection.enabled', true]]},
aCallback);
}
}
/**