background-335

background shorthand - only one value

WeasyPrint

This browser

Flags
dom, script
Assertion
Check if one value is present then it sets both 'background-origin' and 'background-clip' to that value

Source

 1 <!DOCTYPE html>
 2 <html><head>
 3     <title>CSS Backgrounds and Borders Test: background shorthand - only one &lt;box&gt; value</title>
 4     <link href="http://www.intel.com" rel="author" title="Intel">
 5     <link href="http://www.w3.org/TR/css3-background/#the-background" rel="help">
 6     <meta content="dom" name="flags">
 7     <meta content="Check if one <box> value is present then it sets both 'background-origin' and 'background-clip' to that value" name="assert">
 8     <style>
 9         #test {
10             background: content-box;
11         }
12     </style>
13     <script src="/resources/testharness.js"></script>
14     <script src="/resources/testharnessreport.js"></script>
15   </head>
16   <body>
17     <div id="log"></div>
18     <div id="test"></div>
19     <script>
20         var cs = getComputedStyle(document.getElementById("test"), null);
21 
22         test(function() {
23             assert_equals(cs.getPropertyValue("background-origin"),
24                 "content-box", "background specified value for background-origin");
25         }, "background_specified_box_one_origin");
26 
27         test(function() {
28             assert_equals(cs.getPropertyValue("background-clip"),
29                 "content-box", "background specified value for background-clip");
30         }, "background_specified_box_one_clip");
31     </script>
32   
33 
34 </body></html>