Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 1 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /document-picture-in-picture/open-pip-window-from-pip-window.https.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<title>Test that documentPictureInPicture.requestWindow()
rejects from a PiP window</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>
<body>
<script>
promise_test(async (t) => {
await test_driver.bless('request PiP window from top window');
const pipWindow = await documentPictureInPicture.requestWindow();
await test_driver.bless('request PiP window from PiP window', pipWindow);
await promise_rejects_dom(t, 'NotAllowedError', pipWindow.DOMException,
pipWindow.documentPictureInPicture.requestWindow());
});
</script>
</body>