tor-browser

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

update-media-feature.html (1539B)


      1 <!DOCTYPE html>
      2 <title>CSS Media Query Test: update media feature</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 fast computer displays as it will no match otherwise. The definition of fast can be found in the spec link.">
      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("(update)");
     11 query_should_be_known("(update: none)");
     12 query_should_be_known("(update: slow)");
     13 query_should_be_known("(update: fast)");
     14 
     15 query_should_be_unknown("(update: ?)");
     16 query_should_be_unknown("(update: 10px)");
     17 query_should_be_unknown("(update: 0)");
     18 
     19 test(() => {
     20  let match_standard = window.matchMedia("(update: fast)");
     21  assert_true(match_standard.matches);
     22 }, "Check that update: fast always matches fast displays");
     23 
     24 test(() => {
     25  let match_standard = window.matchMedia("(update: slow)");
     26  assert_false(match_standard.matches);
     27 }, "Check that update: slow doesn't match fast displays");
     28 
     29 test(() => {
     30  let match_standard = window.matchMedia("(update: none)");
     31  assert_false(match_standard.matches);
     32 }, "Check that update: none doesn't match fast displays");
     33 
     34 test(() => {
     35  let match_standard = window.matchMedia("(update)");
     36  assert_true(match_standard.matches);
     37 }, "Check that update always matches non printing documents");
     38 </script>