tor-browser

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

border-radius-css-text.html (984B)


      1 <!DOCTYPE html>
      2 <html>
      3 <head>
      4 <meta charset="utf-8">
      5 <title>CSS Backgrounds and Borders Module Level 3: border-radius in cssText</title>
      6 <link rel="help" href="https://drafts.csswg.org/css-backgrounds/#border-radius">
      7 <script src="/resources/testharness.js"></script>
      8 <script src="/resources/testharnessreport.js"></script>
      9 </head>
     10 <body>
     11 <div id="test"></div>
     12 <script>
     13 test(() => {
     14    const element = document.getElementById("test");
     15    assert_equals(element.style.cssText, "", "cssText is initially empty");
     16 
     17    element.style.borderRadius = "10px";
     18    assert_equals(element.style.cssText, "border-radius: 10px;");
     19 
     20    element.style.borderTopLeftRadius = "20px";
     21    assert_equals(element.style.cssText, "border-radius: 20px 10px 10px;");
     22 
     23    element.style.borderBottomLeftRadius = "30px";
     24    assert_equals(element.style.cssText, "border-radius: 20px 10px 10px 30px;");
     25 }, "Setting border-radius does not expand to longhand properties in cssText.");
     26 </script>
     27 </body>
     28 </html>