OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <title>Shape Outside Basic Shape Arguments</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/#serializing-css-value
s"> |
| 11 <meta name="assert" content="A basic basic shape can contain any length
unit type, or percentage"> |
| 12 <meta name="flags" content="dom"> |
| 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 // relative units: em, ex, ch, rem, vw, vh, vmin, vmax |
| 21 // fixed units: cm, mm, in, px, pt, pc |
| 22 // percentage unit: % |
| 23 // zero length: 0 |
| 24 var basic_shape_args_tests = [ |
| 25 { |
| 26 "name": "0-valued", |
| 27 "actual": "polygon(nonzero, 0 0)", |
| 28 "expected_inline": "polygon(0px 0px)", |
| 29 "expected_computed": "polygon(0px 0px)" |
| 30 }, |
| 31 { |
| 32 "name": "Font relative units", |
| 33 "actual": "polygon(nonzero, 1em 1ex, 1ch 1rem)", |
| 34 "expected_inline": "polygon(1em 1ex, 1ch 1rem)", |
| 35 "expected_computed": "polygon(1em 1ex, 1ch 1rem)" // converted
to px by the framework |
| 36 }, |
| 37 { |
| 38 "name": "View relative units", |
| 39 "actual": "polygon(nonzero, 1vw 1vh, 1vmin 1vmax)", |
| 40 "expected_inline": "polygon(1vw 1vh, 1vmin 1vmax)", |
| 41 "expected_computed": "polygon(1vw 1vh, 1vmin 1vmax)" // conver
ted to px by the framework |
| 42 }, |
| 43 { |
| 44 "name": "Fixed units", |
| 45 "actual": "polygon(nonzero, 1cm 1mm, 1in 1px, 1pt 1pc)", |
| 46 "expected_inline": "polygon(1cm 1mm, 1in 1px, 1pt 1pc)", |
| 47 "expected_computed": "polygon(1cm 1mm, 1in 1px, 1pt 1pc)" // c
onverted to px by the framework |
| 48 }, |
| 49 { |
| 50 "name": "Percentage units", |
| 51 "actual": "polygon(nonzero, 1% 2%)", |
| 52 "expected_inline": "polygon(1% 2%)", |
| 53 "expected_computed": "polygon(1% 2%)" |
| 54 } |
| 55 ]; |
| 56 generate_tests( ParsingUtils.testInlineStyle, |
| 57 ParsingUtils.buildTestCases(basic_shape_args_tests,
"inline") ); |
| 58 generate_tests( ParsingUtils.testComputedStyle, |
| 59 ParsingUtils.buildTestCases(basic_shape_args_tests,
"computed") ); |
| 60 </script> |
| 61 </body> |
| 62 </html> |
OLD | NEW |