tor-browser

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

background-origin-001.html (1996B)


      1 <!DOCTYPE html>
      2 <html>
      3  <head>
      4    <title>CSS Backgrounds and Borders Test: background-origin - initial and supported values</title>
      5    <link rel="author" title="Intel" href="http://www.intel.com" />
      6    <link rel="help" href="http://www.w3.org/TR/css3-background/#the-background-origin" />
      7    <meta name="flags" content="dom" />
      8    <meta name="assert" content="Check if background-origin initial value is padding-box and supports values border-box, padding-box and content-box" />
      9    <script src="/resources/testharness.js"></script>
     10    <script src="/resources/testharnessreport.js"></script>
     11  </head>
     12  <body>
     13    <div id="log"></div>
     14    <div id="test"></div>
     15    <script>
     16        test(function() {
     17            assert_equals(getComputedStyle(document.getElementById("test"), null).getPropertyValue("background-origin"),
     18                "padding-box", "background-origin initial value");
     19        }, "background-origin_initial");
     20 
     21        document.getElementById("test").style.backgroundOrigin = "border-box";
     22        test(function() {
     23            assert_equals(getComputedStyle(document.getElementById("test"), null).getPropertyValue("background-origin"),
     24                "border-box", "background-origin supporting value");
     25        }, "background-origin_border-box");
     26 
     27        document.getElementById("test").style.backgroundOrigin = "padding-box";
     28        test(function() {
     29            assert_equals(getComputedStyle(document.getElementById("test"), null).getPropertyValue("background-origin"),
     30                "padding-box", "background-origin supporting value");
     31        }, "background-origin_padding-box");
     32 
     33        document.getElementById("test").style.backgroundOrigin = "content-box";
     34        test(function() {
     35            assert_equals(getComputedStyle(document.getElementById("test"), null).getPropertyValue("background-origin"),
     36                "content-box", "background-origin supporting value");
     37        }, "background-origin_content-box");
     38    </script>
     39  </body>
     40 </html>