tor-browser

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

getComputedStyle-logical-enumeration.html (1230B)


      1 <!doctype html>
      2 <meta charset="utf-8">
      3 <title>CSSOM: getComputedStyle enumeration</title>
      4 <link rel="help" href="https://drafts.csswg.org/cssom/#dom-window-getcomputedstyle">
      5 <link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
      6 <link rel="help" href="https://bugs.webkit.org/show_bug.cgi?id=210695">
      7 <link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1072180">
      8 <script src=/resources/testharness.js></script>
      9 <script src=/resources/testharnessreport.js></script>
     10 <script>
     11  test(function() {
     12    let longhand = false;
     13    let shorthand = false;
     14    let env = false;
     15    for (let property of getComputedStyle(document.documentElement)) {
     16      if (property == "block-size")
     17        longhand = true;
     18      if (property == "padding-block")
     19        shorthand = true;
     20      if (property == "safe-area-inset-top")
     21        env = true;
     22    }
     23    assert_true(longhand, "Logical longhands should be enumerated in computed style");
     24    assert_false(shorthand, "Logical shorthands should not be enumerated in computed style");
     25    assert_false(env, "Environment variables should not be enumerated in computed style");
     26  }, "Logical properties in enumeration of computed style")
     27 </script>