blob: 2c5d1170af4abea6a74decb6759198cbfb9c9324 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
<!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>
|