blob: b6a687d65ac1fb82ae8a66fe8220517b8bd6c901 [file] [log] [blame]
<!DOCTYPE HTML>
<html>
<head>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
</head>
<body>
<div id="navigateToSamePage"></div>
<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(() => {
}).then(() => {
window.location = "#navigateToSamePage";
}).then(() => {
return navigator.mediaDevices.getUserMedia({audio:false, video:true});
});
}, "Testing same page getUserMedia grant persistency after in page navigation");
</script>
</body>
</html>