background-335.html (1319B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>CSS Backgrounds and Borders Test: background shorthand - only one <box> value</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" /> 7 <meta name="flags" content="dom" /> 8 <meta name="assert" content="Check if one <box> value is present then it sets both 'background-origin' and 'background-clip' to that value" /> 9 <style> 10 #test { 11 background: content-box; 12 } 13 </style> 14 <script src="/resources/testharness.js"></script> 15 <script src="/resources/testharnessreport.js"></script> 16 </head> 17 <body> 18 <div id="log"></div> 19 <div id="test"></div> 20 <script> 21 var cs = getComputedStyle(document.getElementById("test"), null); 22 23 test(function() { 24 assert_equals(cs.getPropertyValue("background-origin"), 25 "content-box", "background specified value for background-origin"); 26 }, "background_specified_box_one_origin"); 27 28 test(function() { 29 assert_equals(cs.getPropertyValue("background-clip"), 30 "content-box", "background specified value for background-clip"); 31 }, "background_specified_box_one_clip"); 32 </script> 33 </body> 34 </html>