summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-backgrounds/background-336.html
blob: b921732ca82ce61a81dd4e8e5343c6c74450e64c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<!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>