overflow-media-features.html (2243B)
1 <!DOCTYPE html> 2 <title>CSS Media Queries Test: overflow media features</title> 3 <link rel="help" href="https://drafts.csswg.org/mediaqueries-4/#descdef-media-update"> 4 <meta assert="The test is supposed to be run on computer displays as it will no match otherwise"> 5 <script type="text/javascript" src="/resources/testharness.js"></script> 6 <script type="text/javascript" src="/resources/testharnessreport.js"></script> 7 <script type="text/javascript" src="resources/matchmedia-utils.js"></script> 8 9 <script> 10 query_should_be_known("(overflow-inline)"); 11 query_should_be_known("(overflow-inline: none)"); 12 query_should_be_known("(overflow-inline: scroll)"); 13 14 query_should_be_unknown("overflow-inline"); 15 query_should_be_unknown("(overflow-inline: ?)"); 16 query_should_be_unknown("(overflow-inline: 10px)"); 17 query_should_be_unknown("(overflow-inline: 0)"); 18 19 query_should_be_known("(overflow-block)"); 20 query_should_be_known("(overflow-block: none)"); 21 query_should_be_known("(overflow-block: scroll)"); 22 query_should_be_known("(overflow-block: paged)"); 23 24 query_should_be_unknown("overflow-block"); 25 query_should_be_unknown("(overflow-block: ?)"); 26 query_should_be_unknown("(overflow-block: 10px)"); 27 query_should_be_unknown("(overflow-block: 0)"); 28 29 test(() => { 30 let match_standard = window.matchMedia("(overflow-inline: scroll)"); 31 assert_true(match_standard.matches); 32 }, "Check that overflow-inline: scroll always matches non printing documents"); 33 34 test(() => { 35 let match_standard = window.matchMedia("(overflow-block: scroll)"); 36 assert_true(match_standard.matches); 37 }, "Check that overflow-block: scroll always matches non printing documents"); 38 39 test(() => { 40 let match_standard = window.matchMedia("(overflow-inline: none)"); 41 assert_false(match_standard.matches); 42 }, "Check that overflow-inline: none doesn't match non printing documents"); 43 44 test(() => { 45 let match_standard = window.matchMedia("(overflow-block: none)"); 46 assert_false(match_standard.matches); 47 }, "Check that overflow-block: none doesn't match non printing documents"); 48 49 test(() => { 50 let match_standard = window.matchMedia("(overflow-block: paged)"); 51 assert_false(match_standard.matches); 52 }, "Check that overflow-block: paged doesn't match non printing documents"); 53 </script>