tor-browser

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

controlsList.tentative.html (842B)


      1 <!DOCTYPE html>
      2 <title>Test controlsList attribute</title>
      3 <link rel="help" href="https://github.com/whatwg/html/pull/6715">
      4 <script src="/resources/testharness.js"></script>
      5 <script src="/resources/testharnessreport.js"></script>
      6 <script>
      7 const allowedValues = [
      8  "nodownload",
      9  "nofullscreen",
     10  "noplaybackrate",
     11  "noremoteplayback",
     12 ];
     13 
     14 function testControlsList(tagName) {
     15  const element = document.createElement(tagName);
     16 
     17  // Test that supports() is returning true for allowed values.
     18  for (const value of allowedValues) {
     19    assert_true(
     20      element.controlsList.supports(value),
     21      `tag = ${element.tagName}, value = ${value} must be supported`
     22    );
     23  }
     24 }
     25 
     26 ["audio", "video"].forEach((tagName) => {
     27  test(
     28    () => testControlsList(tagName),
     29    `Test controlsList allowed values for <${tagName}>`
     30  );
     31 });
     32 </script>