<!DOCTYPE html>
<title>Test Picture-in-Picture is disabled in document pip.</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="resources/picture-in-picture-helpers.js"></script>
<body></body>
<script>
promise_test(async t => {
await test_driver.bless("request document pip");
const pipWindow = await documentPictureInPicture.requestWindow();
assert_false(pipWindow.document.pictureInPictureEnabled);
const video = await loadVideo(pipWindow.document, '../content/test.ogv');
return promise_rejects_dom(t, 'NotSupportedError', pipWindow.DOMException,
video.requestPictureInPicture());
});
</script>