shape-outside-polygon-002.html (2352B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>Shape Outside Polygon Valid Points</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/#funcdef-polygon"> 9 <link rel="help" href="http://www.w3.org/TR/css-shapes-1/#shape-outside-property"> 10 <meta name="assert" content="A polygonal basic shape's points may be either lengths or percentages"> 11 <meta name="flags" content="ahem dom"> 12 <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1"> 13 <script src="/resources/testharness.js"></script> 14 <script src="/resources/testharnessreport.js"></script> 15 <script src="support/parsing-utils.js"></script> 16 </head> 17 <body> 18 <div id="log"></div> 19 <script type="text/javascript"> 20 var valid_polygon_points_tests = [ 21 { 22 "name": "Lengths", 23 "actual": "polygon(1px 2px, 3px 4px, 5px 6px)", 24 "expected_inline": "polygon(1px 2px, 3px 4px, 5px 6px)", 25 "expected_computed": "polygon(1px 2px, 3px 4px, 5px 6px)" 26 }, 27 { 28 "name": "Percentages", 29 "actual": "polygon(1% 2%, 3% 4%, 5% 6%)", 30 "expected_inline": "polygon(1% 2%, 3% 4%, 5% 6%)", 31 "expected_computed": "polygon(1% 2%, 3% 4%, 5% 6%)" 32 }, 33 { 34 "name": "Mixed Lengths and Percentages", 35 "actual": "polygon(1px 2px, 3px 4%, 5% 6px, 7% 8%)", 36 "expected_inline": "polygon(1px 2px, 3px 4%, 5% 6px, 7% 8%)", 37 "expected_computed": "polygon(1px 2px, 3px 4%, 5% 6px, 7% 8%)" 38 } 39 ]; 40 generate_tests( ParsingUtils.testInlineStyle, 41 ParsingUtils.buildTestCases(valid_polygon_points_tests, 'inline') ); 42 generate_tests( ParsingUtils.testComputedStyle, 43 ParsingUtils.buildTestCases(valid_polygon_points_tests, 'computed') ); 44 </script> 45 </body> 46 </html>