OLD | NEW |
1 description('Test that exclusion shapes accept different length units'); | 1 description('Test that exclusion shapes accept different length units'); |
2 | 2 |
3 if (window.internals) | |
4 window.internals.settings.setCSSExclusionsEnabled(true); | |
5 | |
6 // The test functions and globals used here are defined parsing-test-utils.js. | 3 // The test functions and globals used here are defined parsing-test-utils.js. |
7 | 4 |
8 function getStyleValue(property, value) { | 5 function getStyleValue(property, value) { |
9 var div = document.createElement("div"); | 6 var div = document.createElement("div"); |
10 div.style.setProperty(property, value); | 7 div.style.setProperty(property, value); |
11 return div.style.getPropertyValue(property); | 8 return div.style.getPropertyValue(property); |
12 } | 9 } |
13 | 10 |
14 function testStyleValue(value, expected) { | 11 function testStyleValue(value, expected) { |
15 if (expected === null) | 12 if (expected === null) |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 | 83 |
87 // reject negative height and width | 84 // reject negative height and width |
88 testInvalidValue("-webkit-shape-inside", "rectangle(1cm, 1mm, -1in, 1px, 1pt, 1p
c)"); | 85 testInvalidValue("-webkit-shape-inside", "rectangle(1cm, 1mm, -1in, 1px, 1pt, 1p
c)"); |
89 testInvalidValue("-webkit-shape-inside", "rectangle(1cm, 1mm, 1in, -1px, 1pt, 1p
c)"); | 86 testInvalidValue("-webkit-shape-inside", "rectangle(1cm, 1mm, 1in, -1px, 1pt, 1p
c)"); |
90 | 87 |
91 // reject negative top, right, bottom, and left | 88 // reject negative top, right, bottom, and left |
92 testInvalidValue("-webkit-shape-inside", "inset-rectangle(-1cm, 1mm, 1in, 1px, 1
pt, 1pc)"); | 89 testInvalidValue("-webkit-shape-inside", "inset-rectangle(-1cm, 1mm, 1in, 1px, 1
pt, 1pc)"); |
93 testInvalidValue("-webkit-shape-inside", "inset-rectangle(1cm, -1mm, 1in, 1px, 1
pt, 1pc)"); | 90 testInvalidValue("-webkit-shape-inside", "inset-rectangle(1cm, -1mm, 1in, 1px, 1
pt, 1pc)"); |
94 testInvalidValue("-webkit-shape-inside", "inset-rectangle(1cm, 1mm, -1in, 1px, 1
pt, 1pc)"); | 91 testInvalidValue("-webkit-shape-inside", "inset-rectangle(1cm, 1mm, -1in, 1px, 1
pt, 1pc)"); |
95 testInvalidValue("-webkit-shape-inside", "inset-rectangle(1cm, 1mm, 1in, -1px, 1
pt, 1pc)"); | 92 testInvalidValue("-webkit-shape-inside", "inset-rectangle(1cm, 1mm, 1in, -1px, 1
pt, 1pc)"); |
OLD | NEW |