tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

requires-width-and-height-to-both-be-specified.https.html (883B)


      1 <!DOCTYPE html>
      2 <title>Test that documentPictureInPicture.requestWindow()
      3  fails if width or height is specified without the other</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 promise_test(async t => {
     11  await test_driver.bless('request PiP window');
     12  await promise_rejects_js(t, RangeError,
     13 documentPictureInPicture.requestWindow({width: 500}));
     14 },
     15    "requestWindow should fail when width is specified without height");
     16 
     17 promise_test(async t => {
     18  await test_driver.bless('request PiP window');
     19  await promise_rejects_js(t, RangeError,
     20 documentPictureInPicture.requestWindow({height: 300}));
     21 },
     22    "requestWindow should fail when height is specified without width");
     23 </script>
     24 </body>