Files
ladybird/Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/scripting.html
Sam Atkins bb035fbfe0 Tests: Import a whole bunch of WPT mediaqueries tests
A lot of these are ref-tests, so I'm skipping the failing ones for now,
and will make as many pass as possible in subsequent commits.
2025-05-23 10:17:58 +01:00

27 lines
1.0 KiB
HTML

<!DOCTYPE html>
<link rel="help" href="https://drafts.csswg.org/mediaqueries-5/#scripting">
<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("(scripting)");
query_should_be_known("(scripting: enabled)");
query_should_be_known("(scripting: initial-only)");
query_should_be_known("(scripting: none)");
query_should_be_unknown("(scripting: 0)");
query_should_be_unknown("(scripting: 10px)");
query_should_be_unknown("(scripting: invalid)");
test(() => {
let match_enabled = window.matchMedia("(scripting: enabled)");
assert_true(match_enabled.matches);
}, "Check that scripting currently matches 'enabled'");
test(() => {
let booleanContext = window.matchMedia("(scripting)");
assert_true(booleanContext.matches);
}, "Check that scripting currently evaluates to true in the boolean context");
</script>