blob: e8fa3a098be71874cb22f00453d9a29b9e0f0278 [file] [log] [blame]
<!DOCTYPE html>
<title>Test Picture-in-Picture disabled by system</title>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<script src="../resources/testdriver.js"></script>
<script src="../resources/testdriver-vendor.js"></script>
<script src="../external/wpt/picture-in-picture/resources/picture-in-picture-helpers.js"></script>
<body></body>
<script>
promise_test(t => {
assert_true(document.pictureInPictureEnabled);
window.internals.settings.setPictureInPictureEnabled(false);
assert_false(document.pictureInPictureEnabled);
return promise_rejects(t, 'NotSupportedError',
requestPictureInPictureWithTrustedClick(document.createElement('video')));
});
</script>