shape-outside-shape-arguments-001.html (2250B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>Shape Outside Shape Number Values</title> 5 <link rel="author" title="Adobe" href="http://html.adobe.com/"> 6 <link rel="author" title="Bear Travis" href="mailto:betravis@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/#typedef-basic-shape"> 9 <link rel="help" href="http://www.w3.org/TR/css-shapes-1/#shape-outside-property"> 10 <link rel="help" href="http://www.w3.org/TR/cssom-1/#serializing-css-values"> 11 <meta name="assert" content="The basic shape can contain all valid number formats"> 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 // number forms: d, +d, -d, .d, +.d, -.d, d.d, +d.d, -d.d 22 var shape_number_values_tests = [ 23 { 24 "name": "Positive number variations", 25 "actual": "polygon(nonzero, 1px +2px, .3px +.4px, 5.5px +6.6px)", 26 "expected_inline": "polygon(1px 2px, 0.3px 0.4px, 5.5px 6.6px)", 27 "expected_computed": "polygon(1px 2px, 0.3px 0.4px, 5.5px 6.6px)" 28 }, 29 { 30 "name": "Negative number variations", 31 "actual": "polygon(nonzero, -1px -.2px, -1.1px 0px)", 32 "expected_inline": "polygon(-1px -0.2px, -1.1px 0px)", 33 "expected_computed": "polygon(-1px -0.2px, -1.1px 0px)" 34 } 35 ]; 36 generate_tests( ParsingUtils.testInlineStyle, 37 ParsingUtils.buildTestCases(shape_number_values_tests, "inline") ); 38 generate_tests( ParsingUtils.testComputedStyle, 39 ParsingUtils.buildTestCases(shape_number_values_tests, "computed") ); 40 </script> 41 </body> 42 </html>