diff options
Diffstat (limited to 'testing/web-platform/tests/html/semantics/embedded-content/media-elements/controlsList.tentative.html')
-rw-r--r-- | testing/web-platform/tests/html/semantics/embedded-content/media-elements/controlsList.tentative.html | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/semantics/embedded-content/media-elements/controlsList.tentative.html b/testing/web-platform/tests/html/semantics/embedded-content/media-elements/controlsList.tentative.html new file mode 100644 index 0000000000..11144839ee --- /dev/null +++ b/testing/web-platform/tests/html/semantics/embedded-content/media-elements/controlsList.tentative.html @@ -0,0 +1,32 @@ +<!DOCTYPE html> +<title>Test controlsList attribute</title> +<link rel="help" href="https://github.com/whatwg/html/pull/6715"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script> +const allowedValues = [ + "nodownload", + "nofullscreen", + "noplaybackrate", + "noremoteplayback", +]; + +function testControlsList(tagName) { + const element = document.createElement(tagName); + + // Test that supports() is returning true for allowed values. + for (const value of allowedValues) { + assert_true( + element.controlsList.supports(value), + `tag = ${element.tagName}, value = ${value} must be supported` + ); + } +} + +["audio", "video"].forEach((tagName) => { + test( + () => testControlsList(tagName), + `Test controlsList allowed values for <${tagName}>` + ); +}); +</script> |