blob: 751da0ce17fb958f358adcaaf13cd2a33d5c5576 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
</head>
<body>
<script>
promise_test(async (test) => {
if (!window.internals)
return;
if (window.testRunner)
testRunner.setUserMediaPermission(false);
await navigator.mediaDevices.getUserMedia({ audio: true }).then(assert_unreached, () => { });
if (window.testRunner)
testRunner.setUserMediaPermission(true);
let promise;
internals.withUserGesture(() => {
promise = navigator.mediaDevices.getUserMedia({ audio: true, video: true }).then((stream) => {
stream.getAudioTracks()[0].stop();
stream.getVideoTracks()[0].stop();
}, assert_unreached);
});
await promise;
return navigator.mediaDevices.getUserMedia({ audio: true });
}, "Remove audio denied request upon successful audio/video request");
</script>
</body>
</html>