enter-event.https.html (685B)
1 <!DOCTYPE html> 2 <title>Test that enter event is fired at documentPictureInPicture 3 when the PiP window in opened.</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 async_test((t) => { 11 test_driver.bless('request PiP window').then(t.step_func(_ => { 12 documentPictureInPicture.onenter = t.step_func_done((e) => { 13 assert_true(e.isTrusted, "is trusted"); 14 assert_false(e.cancelable, "is not cancelable"); 15 }); 16 documentPictureInPicture.requestWindow(); 17 })); 18 }); 19 </script> 20 </body>