3149ed5ca56649f752edb498837a5baad1d685a2
[WebKit-https.git] / LayoutTests / fast / exclusions / css-exclusions-disabled.html
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <script src="../js/resources/js-test-pre.js"></script>
5 <script>
6
7 description('Test that parsing of css exclusions related properties can be disabled.');
8
9 if (window.internals) {
10     window.internals.settings.setCSSShapesEnabled(false);
11     window.internals.settings.setCSSExclusionsEnabled(false);
12 }
13
14 function testInlineStyle(property, value) {
15     var div = document.createElement("div");
16     div.setAttribute("style", property + ": " + value);
17     return div.style.getPropertyValue(property);
18 }
19
20 function testComputedStyle(property, value) {
21     var div = document.createElement("div");
22     document.body.appendChild(div);
23     div.style.setProperty(property, value);
24     var computedValue = getComputedStyle(div).getPropertyValue(property);
25     document.body.removeChild(div);
26     return computedValue;
27 }
28
29 function testStyle(property, value, computedExpected) {
30     shouldBeNull('testInlineStyle("' + property + '", "' + value + '")');
31     shouldBeEqualToString('testComputedStyle("' + property + '", "' + value + '")', computedExpected);
32 }
33
34 testStyle("-webkit-wrap-flow", "both", "auto");
35 testStyle("-webkit-wrap-through", "none", "wrap");
36
37 </script>
38 <script src="../js/resources/js-test-post.js"></script>
39 </body>
40 </html>