tor-browser

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

content-valid.html (2410B)


      1 <!DOCTYPE html>
      2 <html>
      3 <head>
      4 <meta charset="utf-8">
      5 <title>CSS Content Module Level 3: Valid parsing</title>
      6 <link rel="author" title="Tim Nguyen" href="https://github.com/nt1m">
      7 <link rel="help" href="https://drafts.csswg.org/css-content-3/#content-property">
      8 <script src="/resources/testharness.js"></script>
      9 <script src="/resources/testharnessreport.js"></script>
     10 <script src="/css/support/parsing-testcommon.js"></script>
     11 </head>
     12 <body>
     13 <div id="target"></div>
     14 <script>
     15 function test_valid_value_combinations(property, value, serialized) {
     16    if (arguments.length < 3)
     17        serialized = value;
     18    test_valid_value(property, value, serialized);
     19    test_valid_value(property, `${value} / "alt text"`, `${serialized} / "alt text"`);
     20 }
     21 
     22 test_valid_value("content", "none");
     23 test_valid_value("content", "normal");
     24 
     25 test_valid_value_combinations("content", "open-quote");
     26 test_valid_value_combinations("content", "close-quote");
     27 test_valid_value_combinations("content", "no-open-quote");
     28 test_valid_value_combinations("content", "no-close-quote");
     29 
     30 test_valid_value_combinations("content", "counter(counter-name)");
     31 test_valid_value_combinations("content", "counter(counter-name, counter-style)");
     32 test_valid_value_combinations("content", "counter(counter-name, dECiMaL)", "counter(counter-name)");
     33 test_valid_value_combinations("content", "counter(counter-name, DECIMAL)", "counter(counter-name)");
     34 
     35 test_valid_value_combinations("content", `counters(counter-name, ".")`);
     36 test_valid_value_combinations("content", `counters(counter-name, ".", counter-style)`);
     37 test_valid_value_combinations("content", `counters(counter-name, ".", dECiMaL)`, `counters(counter-name, ".")`);
     38 test_valid_value_combinations("content", `counters(counter-name, ".", DECIMAL)`, `counters(counter-name, ".")`);
     39 
     40 test_valid_value_combinations("content", `url("picture.svg")`);
     41 
     42 test_valid_value_combinations("content", `"hello"`);
     43 
     44 test_valid_value_combinations("content", `"hello" "world"`);
     45 test_valid_value_combinations("content", `counter(counter-name) "potato"`);
     46 test_valid_value_combinations("content", `counters(counter-name, ".") "potato"`);
     47 test_valid_value_combinations("content", `"(" counters(counter-name, ".", counter-style) ")"`);
     48 test_valid_value_combinations("content", `open-quote "hello" "world" close-quote`);
     49 test_valid_value_combinations("content", `url("picture.svg") "hello"`);
     50 </script>
     51 </body>
     52 </html>