open-pip-window-from-pip-window.https.html (730B)
1 <!DOCTYPE html> 2 <title>Test that documentPictureInPicture.requestWindow() 3 rejects from a PiP window</title> 4 <script src="/resources/testharness.js"></script> 5 <script src="/resources/testharnessreport.js"></script> 6 <script src="/resources/testdriver.js"></script> 7 <script src="/resources/testdriver-vendor.js"></script> 8 <body> 9 <script> 10 promise_test(async (t) => { 11 await test_driver.bless('request PiP window from top window'); 12 const pipWindow = await documentPictureInPicture.requestWindow(); 13 14 await test_driver.bless('request PiP window from PiP window', pipWindow); 15 await promise_rejects_dom(t, 'NotAllowedError', pipWindow.DOMException, 16 pipWindow.documentPictureInPicture.requestWindow()); 17 }); 18 </script> 19 </body>