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