blob: dd5b72dc2f88c346e7ce6c1ddc92c014a8445300 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
</head>
<body>
<script>
description("Tests UserMedia success callback using the mock service.");
window.jsTestIsAsync = true;
if (window.testRunner)
testRunner.setUserMediaPermission(true);
else
debug('This test can not be run without the testRunner');
var options = {audio: true, video: true};
navigator.mediaDevices.getUserMedia(options)
.then(stream => {
finishJSTest();
})
.catch(err => {
testFailed('Error callback invoked unexpectedly');
finishJSTest();
});
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>