OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <title>Shape Outside Inset round args - calc() values</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 <link rel="help" href="http://www.w3.org/TR/css3-values/#calc"> |
| 11 <meta name="assert" content="An inset's radial component arguments may b
e in calc() values."> |
| 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 var fullInset = '10px 10px 10px 10px'; |
| 21 var serializedInset = "10px"; |
| 22 |
| 23 var inset_round_calc_tests = []; |
| 24 ParsingUtils.calcTestValues.forEach(function(value) { |
| 25 testCase = ['inset('+ fullInset +' round '+ value[0] +')', |
| 26 'inset('+ serializedInset +' round '+ value[1] +')']
; |
| 27 // array check |
| 28 if(Object.prototype.toString.call( value[2] ) === '[object Array
]' && value[2].length == 2) { |
| 29 testCase.push([ |
| 30 'inset('+ serializedInset +' round '+ value[
2][0] +')', |
| 31 'inset('+ serializedInset +' round '+ value[
2][1] +')' |
| 32 ]); |
| 33 } else { |
| 34 testCase.push('inset('+ serializedInset +' round '+ value[2]
+')'); |
| 35 } |
| 36 inset_round_calc_tests.push(testCase); |
| 37 }); |
| 38 ParsingUtils.calcTestValues.forEach(function(value) { |
| 39 testCase = ['inset('+ fullInset +' round '+ value[0] +' '+ valu
e[0] +')', |
| 40 'inset('+ serializedInset +' round '+ value[1] +')']
; |
| 41 if(Object.prototype.toString.call( value[2] ) === '[object Array
]' && value[2].length == 2) { |
| 42 testCase.push([ |
| 43 'inset('+ serializedInset +' round '+ value[
2][0] +')', |
| 44 'inset('+ serializedInset +' round '+ value[
2][1] +')' |
| 45 ]); |
| 46 } else { |
| 47 testCase.push('inset('+ serializedInset +' round '+ value[2]
+')'); |
| 48 } |
| 49 inset_round_calc_tests.push(testCase); |
| 50 }); |
| 51 generate_tests(ParsingUtils.testInlineStyle, ParsingUtils.buildCalcT
ests(inset_round_calc_tests, 'inline')); |
| 52 generate_tests(ParsingUtils.testComputedStyle, ParsingUtils.buildCal
cTests(inset_round_calc_tests, 'computed')); |
| 53 </script> |
| 54 </body> |
| 55 </html> |
OLD | NEW |