| <!DOCTYPE html> |
| <html> |
| <body> |
| <script src="../../resources/js-test-pre.js"></script> |
| <script> |
| |
| description('Test that parsing of css shapes related properties can be disabled.'); |
| |
| if (window.internals) |
| window.internals.settings.setCSSShapesEnabled(false); |
| |
| function testInlineStyle(property, value) { |
| var div = document.createElement("div"); |
| div.setAttribute("style", property + ": " + value); |
| return div.style.getPropertyValue(property); |
| } |
| |
| function testComputedStyle(property, value) { |
| var div = document.createElement("div"); |
| document.body.appendChild(div); |
| div.style.setProperty(property, value); |
| var computedValue = getComputedStyle(div).getPropertyValue(property); |
| document.body.removeChild(div); |
| return computedValue; |
| } |
| |
| function testStyle(property, value, computedExpected) { |
| shouldBeNull('testInlineStyle("' + property + '", "' + value + '")'); |
| shouldBeEqualToString('testComputedStyle("' + property + '", "' + value + '")', computedExpected); |
| } |
| |
| testStyle("-webkit-shape-margin", "10px", "0px"); |
| testStyle("-webkit-shape-padding", "10px", "0px"); |
| |
| testStyle("-webkit-shape-outside", "circle(10px, 10px, 10px)", "auto"); |
| testStyle("-webkit-shape-inside", "circle(10px, 10px, 10px)", "outside-shape"); |
| |
| </script> |
| <script src="../../resources/js-test-post.js"></script> |
| </body> |
| </html> |