blob: dd5b72dc2f88c346e7ce6c1ddc92c014a8445300 [file] [log] [blame]
philn@webkit.org13b90942014-11-12 08:25:05 +00001<!DOCTYPE html>
2<html>
3<head>
4<script src="../../resources/js-test-pre.js"></script>
5</head>
6<body>
7<script>
8description("Tests UserMedia success callback using the mock service.");
9window.jsTestIsAsync = true;
10
11if (window.testRunner)
12 testRunner.setUserMediaPermission(true);
13else
14 debug('This test can not be run without the testRunner');
15
16var options = {audio: true, video: true};
eric.carlson@apple.comc1470962017-02-09 17:29:58 +000017navigator.mediaDevices.getUserMedia(options)
18 .then(stream => {
19 finishJSTest();
20 })
21 .catch(err => {
22 testFailed('Error callback invoked unexpectedly');
23 finishJSTest();
24 });
philn@webkit.org13b90942014-11-12 08:25:05 +000025</script>
26<script src="../../resources/js-test-post.js"></script>
27</body>
28</html>