4 <title>-webkit-text-stroke shorthand getPropertyValue test
</title>
11 <script src=
"../../resources/js-test.js"></script>
13 if (window
.testRunner
)
14 testRunner
.dumpAsText();
18 <div id=
"text-stroke1" class=
"test" style=
"-webkit-text-stroke: thin red;"></div>
19 <div id=
"text-stroke2" class=
"test" style=
"-webkit-text-stroke: green;"></div>
20 <div id=
"text-stroke3" class=
"test" style=
"-webkit-text-stroke: thin;"></div>
21 <div id=
"text-stroke4" class=
"test" style=
"-webkit-text-stroke: 1px red;"></div>
22 <div id=
"text-stroke5" class=
"test" style=
"-webkit-text-stroke-width: 1px; -webkit-text-stroke-color: black;"></div>
23 <div id=
"text-stroke6" class=
"test" style=
"-webkit-text-stroke: foo;"></div>
24 <div id=
"text-stroke7" class=
"test" style=
"-webkit-text-stroke-color: green;"></div>
26 description("<a href=\"https://bugs.webkit.org/show_bug.cgi?id=111018\">Bug 111018: getPropertyValue for -webkit-text-stroke returns null, should compute the shorthand value</a>");
28 function webkitTextStrokeValue(id
) {
29 var element
= document
.getElementById(id
);
30 return element
.style
.getPropertyValue("-webkit-text-stroke");
33 shouldBeEqualToString('webkitTextStrokeValue("text-stroke1")', 'thin red');
34 shouldBeEqualToString('webkitTextStrokeValue("text-stroke2")', 'green');
35 shouldBeEqualToString('webkitTextStrokeValue("text-stroke3")', 'thin');
36 shouldBeEqualToString('webkitTextStrokeValue("text-stroke4")', '1px red');
37 shouldBeEqualToString('webkitTextStrokeValue("text-stroke5")', '1px black');
38 debug("NOTE: 'foo' is an illegal CSS value for '-webkit-text-stroke'.");
39 shouldBeEqualToString('webkitTextStrokeValue("text-stroke6")', "");
40 debug("NOTE: If only few longhand properties are specified, getPropertyValue for shorthand property returns empty string.")
41 shouldBeEqualToString('webkitTextStrokeValue("text-stroke7")', "");