iframe-document-pip.https.html (736B)
1 <!DOCTYPE html> 2 <title>Test that document pip is not allowed in iframes.</title> 3 <script src="/resources/testharness.js"></script> 4 <script src="/resources/testharnessreport.js"></script> 5 <script src="/resources/testdriver.js"></script> 6 <script src="/resources/testdriver-vendor.js"></script> 7 <body> 8 <iframe></iframe> 9 </body> 10 <script> 11 promise_test(t => { 12 const frame = document.querySelector('iframe'); 13 const frameDOMException = frame.contentWindow.DOMException; 14 return test_driver.bless('request PiP window from iframe', frame.contentWindow).then(t.step_func(_ => { 15 return promise_rejects_dom(t, 'NotAllowedError', frameDOMException, 16 frame.contentWindow.documentPictureInPicture.requestWindow()); 17 })); 18 }); 19 </script>