diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
commit | 43a97878ce14b72f0981164f87f2e35e14151312 (patch) | |
tree | 620249daf56c0258faa40cbdcf9cfba06de2a846 /testing/web-platform/tests/css/mediaqueries/dynamic-range.html | |
parent | Initial commit. (diff) | |
download | firefox-43a97878ce14b72f0981164f87f2e35e14151312.tar.xz firefox-43a97878ce14b72f0981164f87f2e35e14151312.zip |
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/css/mediaqueries/dynamic-range.html')
-rw-r--r-- | testing/web-platform/tests/css/mediaqueries/dynamic-range.html | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/mediaqueries/dynamic-range.html b/testing/web-platform/tests/css/mediaqueries/dynamic-range.html new file mode 100644 index 0000000000..babe1b9f0d --- /dev/null +++ b/testing/web-platform/tests/css/mediaqueries/dynamic-range.html @@ -0,0 +1,36 @@ +<!DOCTYPE html> +<link rel="help" title="6.5 dynamic-range" href="https://www.w3.org/TR/mediaqueries-5/#dynamic-range"> +<script type="text/javascript" src="/resources/testharness.js"></script> +<script type="text/javascript" src="/resources/testharnessreport.js"></script> +<script type="text/javascript" src="resources/matchmedia-utils.js"></script> + +<script> +query_should_be_known("(dynamic-range: standard)"); +query_should_be_known("(dynamic-range: high)"); +query_should_be_known("(video-dynamic-range: standard)"); +query_should_be_known("(video-dynamic-range: high)"); + +query_should_be_unknown("(dynamic-range)"); +query_should_be_unknown("(dynamic-range: 0)"); +query_should_be_unknown("(dynamic-range: 10px)"); +query_should_be_unknown("(dynamic-range: invalid)"); +query_should_be_unknown("(video-dynamic-range)"); +query_should_be_unknown("(video-dynamic-range: 0)"); +query_should_be_unknown("(video-dynamic-range: 10px)"); +query_should_be_unknown("(video-dynamic-range: invalid)"); + +test(() => { + let match_standard = window.matchMedia("(dynamic-range: standard)"); + assert_true(match_standard.matches); +}, "Check that dynamic-range always matches 'standard'"); + +test(() => { + let match_standard = window.matchMedia("(video-dynamic-range: standard)"); + assert_true(match_standard.matches); +}, "Check that video-dynamic-range always matches 'standard'"); + +test(() => { + let match_invalid = window.matchMedia("(video-dynamic-range: invalid)"); + assert_false(match_invalid.matches); +}, "Check that video-dynamic-range is not 'invalid'"); +</script> |