blob: 4a0d653791bacd7bfce2c781765d60d48ed5fc93 [file] [log] [blame]
<!DOCTYPE HTML>
<html>
<head>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
</head>
<body>
<script>
promise_test((test) => {
if (window.testRunner)
testRunner.setUserMediaPermission(true);
return navigator.mediaDevices.getUserMedia({audio:false, video:true}).then((stream) => {
if (window.testRunner)
testRunner.setUserMediaPermission(false);
return navigator.mediaDevices.getUserMedia({audio:false, video:true});
}).then(() => {
if (window.testRunner)
testRunner.setUserMediaPermission(true);
return navigator.mediaDevices.getUserMedia({audio:true, video:false});
}).then(() => {
if (window.testRunner)
testRunner.setUserMediaPermission(false);
return navigator.mediaDevices.getUserMedia({audio:true, video:true});
});
}, "Testing same page getUserMedia grant persistency");
</script>
</body>
</html>