1
0
Fork 0
firefox/testing/web-platform/tests/document-picture-in-picture/requires-width-and-height-to-both-be-specified.https.html
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

24 lines
883 B
HTML

<!DOCTYPE html>
<title>Test that documentPictureInPicture.requestWindow()
fails if width or height is specified without the other</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');
await promise_rejects_js(t, RangeError,
documentPictureInPicture.requestWindow({width: 500}));
},
"requestWindow should fail when width is specified without height");
promise_test(async t => {
await test_driver.bless('request PiP window');
await promise_rejects_js(t, RangeError,
documentPictureInPicture.requestWindow({height: 300}));
},
"requestWindow should fail when height is specified without width");
</script>
</body>