tor-browser

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

li-counter-increment-computed-style.html (1286B)


      1 <!doctype html>
      2 <title>Magic list-item counter-increment shouldn't be visible from computed style</title>
      3 <link rel="help" href="https://drafts.csswg.org/css-lists/#declaring-a-list-item">
      4 <link rel="help" href="https://drafts.csswg.org/css-lists/#list-item-counter">
      5 <link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez">
      6 <link rel="author" href="https://mozilla.org" title="Mozilla">
      7 <script src="/resources/testharness.js"></script>
      8 <script src="/resources/testharnessreport.js"></script>
      9 <li data-expected="none">No explicit counter.
     10 <li><span style="counter-increment:inherit" data-expected="none">Inherited
     11 <li value="10" data-expected="none">Value attribute.
     12 <li style="counter-increment: list-item 10" data-expected="list-item 10">Explicit list-item counter.
     13 <li style="counter-increment: list-item 1" data-expected="list-item 1">Explicit and redundant list-item counter.
     14 <li style="counter-increment: foo 10" data-expected="foo 10">Other counter.
     15 <script>
     16 test(function() {
     17  for (const element of document.querySelectorAll("[data-expected]"))
     18    assert_equals(getComputedStyle(element).counterIncrement, element.getAttribute("data-expected"), element.innerText);
     19 }, "list-item counter-increment shouldn't be visible from computed style");
     20 </script>