Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / cssom-remove-shorthand-property.html
blobfd1cbb8efb809cb450b4ade66cdb8ca2e23cb553
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta charset="utf-8">
5 <script src="../../resources/js-test.js"></script>
6 </head>
7 <body>
8 <script>
10 shorthandProperties = [
11 "font",
12 "border-top",
13 "border-right",
14 "border-bottom",
15 "border-left",
16 "border",
17 "border-color",
18 "border-style",
19 "border-width",
20 "background-position",
21 "background-repeat",
22 "border-spacing",
23 "list-style",
24 "margin",
25 "outline",
26 "padding",
27 "background",
28 "overflow",
29 "border-radius"
32 element = document.createElement('span');
34 function canSetProperty(propertyName) {
35 element.style.setProperty(propertyName, 'initial');
36 return element.style.getPropertyValue(propertyName) == 'initial';
39 function canRemoveProperty(propertyName) {
40 element.style.removeProperty(propertyName);
41 return element.style.getPropertyValue(propertyName) != 'initial';
44 description("Tests that shorthand properties can be removed via CSSOM.");
46 for (i = 0; i < shorthandProperties.length; ++i) {
47 var propertyName = shorthandProperties[i];
49 shouldBe("canSetProperty('" + propertyName + "')", "true");
50 shouldBe("canRemoveProperty('" + propertyName + "')", "true");
53 </script>
54 </body>
55 </html>