testing/web-platform/tests/css/css-backgrounds/background-336.html
author Lando <lando@lando.test>
Fri, 11 Jul 2025 04:32:24 +0000 (62 minutes ago)
changeset 796014 f14d1c1492bc6791542a001365abbca4bd9b28db
parent 392912 9415bff8166863f344256c7a3dd14aa5e038e82b
permissions -rw-r--r--
Merge autoland to mozilla-central
<!DOCTYPE html>
<html>
  <head>
    <title>CSS Backgrounds and Borders Test: background shorthand - two &lt;box&gt; values</title>
    <link rel="author" title="Intel" href="http://www.intel.com" />
    <link rel="help" href="http://www.w3.org/TR/css3-background/#the-background" />
    <meta name="flags" content="dom" />
    <meta name="assert" content="Check if two <box> values are present, then the first sets 'background-origin' and the second 'background-clip'" />
    <style>
        #test {
            background: border-box padding-box;
        }
    </style>
    <script src="/resources/testharness.js"></script>
    <script src="/resources/testharnessreport.js"></script>
  </head>
  <body>
    <div id="log"></div>
    <div id="test"></div>
    <script>
        var cs = getComputedStyle(document.getElementById("test"), null);

        test(function() {
            assert_equals(cs.getPropertyValue("background-origin"),
                "border-box", "background specified value for background-origin");
        }, "background_specified_box_two_origin");

        test(function() {
            assert_equals(cs.getPropertyValue("background-clip"),
                "padding-box", "background specified value for background-clip");
        }, "background_specified_box_two_clip");
    </script>
  </body>
</html>