CSS Exclusions polygon shape arguments should be comma separated
[WebKit-https.git] / LayoutTests / fast / exclusions / script-tests / wrap-through-parsing.js
1 description('Test parsing of the CSS wrap-through property.');
2
3 function test(declaration) {
4     var div = document.createElement("div");
5     div.setAttribute("style", declaration);
6     return div.style.webkitWrapThrough;
7 }
8
9 function testComputedStyle(value) {
10     var div = document.createElement("div");
11     document.body.appendChild(div);
12     div.style.setProperty("-webkit-wrap-through", value);
13     var webkitWrapThroughComputedValue = getComputedStyle(div).getPropertyValue("-webkit-wrap-through");
14     document.body.removeChild(div);
15     return webkitWrapThroughComputedValue;
16 }
17
18 function testNotInherited(parentValue, childValue) {
19     var parentDiv = document.createElement("div");
20     document.body.appendChild(parentDiv);
21     parentDiv.style.setProperty("-webkit-wrap-through", parentValue);
22
23     var childDiv = document.createElement("div");
24     parentDiv.appendChild(childDiv);
25     childDiv.style.setProperty("-webkit-wrap-through", childValue);
26
27     var childWebKitWrapThroughComputedValue = getComputedStyle(childDiv).getPropertyValue("-webkit-wrap-through");
28
29     parentDiv.removeChild(childDiv);
30     document.body.removeChild(parentDiv);
31
32     return childWebKitWrapThroughComputedValue;
33 }
34
35 shouldBeEqualToString('test("-webkit-wrap-through: wrap")', "wrap");
36 shouldBeEqualToString('test("-webkit-wrap-through: none")', "none");
37
38 shouldBeEqualToString('test("-webkit-wrap-through: ;")', "");
39 shouldBeEqualToString('test("-webkit-wrap-through: 5")', "");
40 shouldBeEqualToString('test("-webkit-wrap-through: -1.2")', "");
41 shouldBeEqualToString('test("-webkit-wrap-through: \'string\'")', "");
42
43 shouldBeEqualToString('testComputedStyle("wrap")', "wrap");
44 shouldBeEqualToString('testComputedStyle("5")', "wrap");
45 shouldBeEqualToString('testComputedStyle("\'string\'")', "wrap");
46
47 shouldBeEqualToString('testNotInherited("wrap", "none")', "none");
48 shouldBeEqualToString('testNotInherited("none", "wrap")', "wrap");