tor-browser

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

will-change-invalid.html (1568B)


      1 <!DOCTYPE html>
      2 <html>
      3 <head>
      4 <meta charset="utf-8">
      5 <title>CSS Will Change Test: parsing will-change with invalid values</title>
      6 <link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
      7 <link rel="help" href="https://drafts.csswg.org/css-will-change/#propdef-will-change">
      8 <meta name="assert" content="will-change only supports the grammar 'auto | <animateable-feature>#'.">
      9 <script src="/resources/testharness.js"></script>
     10 <script src="/resources/testharnessreport.js"></script>
     11 <script src="/css/support/parsing-testcommon.js"></script>
     12 </head>
     13 <body>
     14 <script>
     15 test_invalid_value("will-change", "auto transform");
     16 test_invalid_value("will-change", "auto, transform");
     17 test_invalid_value("will-change", "contents auto");
     18 test_invalid_value("will-change", "contents, auto");
     19 
     20 let excludedKeywords = [
     21  // CSS-wide keywords are excluded from <custom-ident>
     22  // https://drafts.csswg.org/css-values-4/#identifier-value
     23  "initial",
     24  "inherit",
     25  "unset",
     26  "revert",
     27  "revert-layer",
     28  "default",
     29 
     30  // will-change additionally excludes the following from <custom-ident>
     31  "will-change",
     32  "none",
     33  "all",
     34 ];
     35 
     36 for (let keyword of excludedKeywords) {
     37  test_invalid_value("will-change", `transform, ${keyword}`);
     38  test_invalid_value("will-change", `${keyword}, transform`);
     39  for (let k of excludedKeywords) {
     40    test_invalid_value("will-change", `${keyword}, ${k}`);
     41  }
     42 }
     43 
     44 test_invalid_value("will-change", "will-change");
     45 test_invalid_value("will-change", "none");
     46 test_invalid_value("will-change", "all");
     47 </script>
     48 </body>
     49 </html>