tor-browser

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

element-request-fullscreen-options.html (1078B)


      1 <!DOCTYPE html>
      2 <title>Element#requestFullscreen({ navigationUI }) support</title>
      3 <script src="/resources/testharness.js"></script>
      4 <script src="/resources/testharnessreport.js"></script>
      5 <body></body>
      6 <script>
      7    // Tests for https://github.com/whatwg/fullscreen/pull/129. Because there are
      8    // no normative requirements on what navigationUI should do, just test for
      9    // basic support. (One could also check that the three allowed enum valid are
     10    // supported and no others, but that would overlap with UA-specific tests.)
     11    promise_test(async (t) => {
     12        const invalidDict = {
     13            get navigationUI() {
     14                return "invalid-value";
     15            },
     16        };
     17        await promise_rejects_js(
     18            t,
     19            TypeError,
     20            document.body.requestFullscreen(invalidDict)
     21        );
     22        await promise_rejects_js(
     23            t,
     24            TypeError,
     25            document.body.requestFullscreen({ navigationUI: "other-invalid-value" })
     26        );
     27    }, "requestFullscreen() with invalid navigationUI values");
     28 </script>