1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="../../../resources/js-test.js"></script>
</head>
<body>
<script>
description("Tests that the -webkit-column-rule shorthand is computed properly.")
var testContainer = document.createElement("div");
testContainer.contentEditable = true;
document.body.appendChild(testContainer);
testContainer.innerHTML = '<div id="test" style="-webkit-column-rule: thin dotted black;">hello</div>';
e = document.getElementById('test');
computedStyle = window.getComputedStyle(e, null);
shouldBeEqualToString("computedStyle.getPropertyValue('-webkit-column-rule')", '1px dotted rgb(0, 0, 0)');
e.style.webkitColumnRule="10px red";
shouldBeEqualToString("computedStyle.getPropertyValue('-webkit-column-rule')", '0px none rgb(255, 0, 0)');
e.style.webkitColumnRuleWidth="medium"
e.style.webkitColumnRuleStyle="dashed"
shouldBeEqualToString("computedStyle.getPropertyValue('-webkit-column-rule')", '3px dashed rgb(255, 0, 0)');
e.style.webkitColumnRule="10px dotted blue"
e.style.webkitColumnRuleStyle="none";
shouldBeEqualToString("computedStyle.getPropertyValue('-webkit-column-rule')", '0px none rgb(0, 0, 255)');
e.style.webkitColumnRuleStyle="hidden";
shouldBeEqualToString("computedStyle.getPropertyValue('-webkit-column-rule')", '0px hidden rgb(0, 0, 255)');
document.body.removeChild(testContainer);
</script>
</body>
</html>
|