shape-outside-inset-004.html (3270B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>Shape Outside Inset - positive/negative, decimal/non-decimal args</title> 5 <link rel="author" title="Adobe" href="http://html.adobe.com/"> 6 <link rel="author" title="Rebecca Hauck" href="mailto:rhauck@adobe.com"> 7 <link rel="reviewer" title="Alan Stearns" href="mailto:stearns@adobe.com"> <!-- 2014-03-04 --> 8 <link rel="help" href="http://www.w3.org/TR/css-shapes-1/#funcdef-inset"> 9 <link rel="help" href="http://www.w3.org/TR/css-shapes-1/#shape-outside-property"> 10 <meta name="assert" content="These tests verify that shape-outside inset() arguments can be numbers that are signed in 11 positive and negative and/or decimal/non-decimal form."> 12 <meta name="flags" content="ahem dom"> 13 <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1"> 14 <script src="/resources/testharness.js"></script> 15 <script src="/resources/testharnessreport.js"></script> 16 <script src="support/parsing-utils.js"></script> 17 </head> 18 <body> 19 <div id="log"></div> 20 <script type="text/javascript"> 21 var valid_inset_args_tests = [ 22 { 23 "actual": "inset(+10px -20px +30px -40px)", 24 "expected_inline": "inset(10px -20px 30px -40px)", 25 "expected_computed": "inset(10px -20px 30px -40px)" 26 }, 27 { 28 "actual": "inset(-10px +20px -30px +40px)", 29 "expected_inline": "inset(-10px 20px -30px 40px)", 30 "expected_computed": "inset(-10px 20px -30px 40px)" 31 }, 32 { 33 "actual": "inset(10.1200px 20.34px 30.56px 40.780px)", 34 "expected_inline": "inset(10.12px 20.34px 30.56px 40.78px)", 35 "expected_computed": "inset(10.12px 20.34px 30.56px 40.78px)" 36 }, 37 { 38 "actual": "inset(10.123px 20.00px 30.10px 40.5678px)", 39 "expected_inline": "inset(10.123px 20px 30.1px 40.5678px)", 40 "expected_computed": "inset(10.123px 20px 30.1px 40.5678px)" 41 }, 42 { 43 "actual": "inset(+10.1200px -20.340px +30.56px -40.780px)", 44 "expected_inline": "inset(10.12px -20.34px 30.56px -40.78px)", 45 "expected_computed": "inset(10.12px -20.34px 30.56px -40.78px)" 46 }, 47 { 48 "actual": "inset(-10.123px +20.00px -30.10px +40.5678px)", 49 "expected_inline": "inset(-10.123px 20px -30.1px 40.5678px)", 50 "expected_computed": "inset(-10.123px 20px -30.1px 40.5678px)" 51 } 52 ]; 53 generate_tests( ParsingUtils.testInlineStyle, 54 ParsingUtils.buildTestCases(valid_inset_args_tests, "inline") ); 55 generate_tests( ParsingUtils.testComputedStyle, 56 ParsingUtils.buildTestCases(valid_inset_args_tests, "computed") ); 57 </script> 58 </body> 59 </html>