shape-image-threshold-001.html (1645B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>Shape Image Threshold - 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="help" href="http://www.w3.org/TR/css-shapes-1/#shape-image-threshold-property"> 8 <meta name="assert" content="shape-image-threshold may take calc values and computed the 9 clipped value between 0 and 1."> 10 <meta name="flags" content="ahem dom"> 11 <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1"> 12 <script src="/resources/testharness.js"></script> 13 <script src="/resources/testharnessreport.js"></script> 14 <script src="support/parsing-utils.js"></script> 15 </head> 16 <body> 17 <div id="log"></div> 18 <script type="text/javascript"> 19 var shape_image_threshold_valid_tests = [ 20 { 21 "actual": "calc(10/100)", 22 "expected_computed": "0.1" 23 }, 24 { 25 "actual": "calc(10/100 + 30/100)", 26 "expected_computed": "0.4" 27 }, 28 { 29 "actual": "calc(150/100)", 30 "expected_computed": "1" 31 }, 32 { 33 "actual": "calc(150/100 - 2)", 34 "expected_computed": "0" 35 } 36 ]; 37 generate_tests( ParsingUtils.testShapeThresholdComputedStyle, 38 ParsingUtils.buildTestCases(shape_image_threshold_valid_tests, 'computed') ); 39 </script> 40 </body> 41 </html>