mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1162720 - Test enumerateDevices. r=jesup, r=drno
This commit is contained in:
parent
bd3bcefb9f
commit
331f1e1871
@ -30,6 +30,8 @@ skip-if = toolkit == 'gonk' || buildapp == 'mulet' # b2g(Bug 960442, video suppo
|
||||
skip-if = toolkit == 'gonk' || buildapp == 'mulet' # b2g emulator seems to be too slow (Bug 1016498 and 1008080)
|
||||
[test_dataChannel_noOffer.html]
|
||||
skip-if = toolkit == 'gonk' || buildapp == 'mulet' # b2g (Bug 1059867)
|
||||
[test_enumerateDevices.html]
|
||||
skip-if = buildapp == 'mulet'
|
||||
[test_getUserMedia_basicAudio.html]
|
||||
skip-if = (toolkit == 'gonk' || buildapp == 'mulet' && debug) # debug-only failure
|
||||
[test_getUserMedia_basicVideo.html]
|
||||
|
28
dom/media/tests/mochitest/test_enumerateDevices.html
Normal file
28
dom/media/tests/mochitest/test_enumerateDevices.html
Normal file
@ -0,0 +1,28 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<script src="mediaStreamPlayback.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<pre id="test">
|
||||
<script type="application/javascript">
|
||||
createHTML({ title: "Run enumerateDevices code", bug: "1046245" });
|
||||
/**
|
||||
Tests covering enumerateDevices API. Exercise code.
|
||||
*/
|
||||
|
||||
runTest(() => navigator.mediaDevices.enumerateDevices()
|
||||
.then(devices => {
|
||||
ok(devices.length > 0, "At least one device found");
|
||||
devices.forEach(d => {
|
||||
ok(d.kind == "videoinput" || d.kind == "audioinput", "Known device kind");
|
||||
is(d.deviceId.length, 44, "Correct device id length");
|
||||
ok(d.label.length !== undefined, "Device label: " + d.label);
|
||||
is(d.groupId, "", "Don't support groupId yet");
|
||||
});
|
||||
}));
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user