# HG changeset patch # User Bryce Van Dyk # Date 1521578793 14400 # Node ID 1dd761da1344317a99e7198fa0423356bc254c11 # Parent a659624435e35a101b36233b3522fc2a07318280 Bug 1443525 - Add mochitests to test gUM when a cubeb context cannot be obtained. r=padenot Add two mochitests to provide coverage for getUserMedia when getting a cubeb context fails. - The first test checks that gUM fails with no audio devices returned. In normal circumstances, without cubeb we do not expect devices to be available. Android is a notable exception here, due to it having a number of different code paths during enumaration, and the test attempts to accomodate this. - The second test checks that if fake streams are enabled, gUM will still return a stream and that this stream can be used. MozReview-Commit-ID: Fn6rGi6W9hM diff --git a/dom/media/tests/mochitest/mochitest.ini b/dom/media/tests/mochitest/mochitest.ini --- a/dom/media/tests/mochitest/mochitest.ini +++ b/dom/media/tests/mochitest/mochitest.ini @@ -62,16 +62,18 @@ skip-if = toolkit == 'android' || (webre [test_getUserMedia_basicTabshare.html] skip-if = toolkit == 'android' # no windowshare on android [test_getUserMedia_basicWindowshare.html] skip-if = toolkit == 'android' # no windowshare on android [test_getUserMedia_basicVideoAudio.html] [test_getUserMedia_bug1223696.html] [test_getUserMedia_constraints.html] [test_getUserMedia_callbacks.html] +[test_getUserMedia_cubebDisabled.html] +[test_getUserMedia_cubebDisabledFakeStreams.html] [test_getUserMedia_GC_MediaStream.html] [test_getUserMedia_getTrackById.html] [test_getUserMedia_gumWithinGum.html] [test_getUserMedia_loadedmetadata.html] [test_getUserMedia_mediaElementCapture_audio.html] skip-if = android_version == '18' # android(Bug 1189784, timeouts on 4.3 emulator) [test_getUserMedia_mediaElementCapture_tracks.html] skip-if = android_version == '18' # android(Bug 1189784, timeouts on 4.3 emulator) diff --git a/dom/media/tests/mochitest/test_getUserMedia_cubebDisabled.html b/dom/media/tests/mochitest/test_getUserMedia_cubebDisabled.html new file mode 100644 --- /dev/null +++ b/dom/media/tests/mochitest/test_getUserMedia_cubebDisabled.html @@ -0,0 +1,59 @@ + + + + + + +
+
+
+ + diff --git a/dom/media/tests/mochitest/test_getUserMedia_cubebDisabledFakeStreams.html b/dom/media/tests/mochitest/test_getUserMedia_cubebDisabledFakeStreams.html new file mode 100644 --- /dev/null +++ b/dom/media/tests/mochitest/test_getUserMedia_cubebDisabledFakeStreams.html @@ -0,0 +1,43 @@ + + + + + + +
+
+
+ +