Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(201)

Side by Side Diff: LayoutTests/fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-shorthand-ordering.html

Issue 20262002: [css3-text] Implement text-decoration property shorthand (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed expectation for last-minute, newly added tests in revision 155705 Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../../js/resources/js-test-pre.js"></script>
5 </head>
6 <body>
7 <script>
8 function testElementStyle(propertyJS, propertyCSS, value)
9 {
10 shouldBe("e.style.getPropertyCSSValue('" + propertyCSS + "').css Text", "'" + value + "'");
11 }
12
13 description("Test to make sure text-decoration longhand values are a ccepted in every possible ordering in shorthand.")
14
15 var testContainer = document.createElement("div");
16 testContainer.contentEditable = true;
17 document.body.appendChild(testContainer);
18
19 testContainer.innerHTML = '<div id="test">hello world</div>';
20
21 var e = document.getElementById('test');
22
23 debug("-line -style -color ordering (underline dashed red):");
24 e.style.textDecoration = 'underline dashed red';
25 testElementStyle("textDecorationLine", "text-decoration-line", "unde rline");
26 testElementStyle("textDecorationStyle", "text-decoration-style", "da shed");
27 testElementStyle("textDecorationColor", "text-decoration-color", "re d");
28 debug("");
29
30 debug("-line -color -style ordering (overline blue dotted):");
31 e.style.textDecoration = 'overline blue dotted';
32 testElementStyle("textDecorationLine", "text-decoration-line", "over line");
33 testElementStyle("textDecorationStyle", "text-decoration-style", "do tted");
34 testElementStyle("textDecorationColor", "text-decoration-color", "bl ue");
35 debug("");
36
37 debug("-style -line -color ordering (double line-through underline o verline green):");
38 e.style.textDecoration = 'double line-through underline overline gre en';
39 testElementStyle("textDecorationLine", "text-decoration-line", "line -through underline overline");
40 testElementStyle("textDecorationStyle", "text-decoration-style", "do uble");
41 testElementStyle("textDecorationColor", "text-decoration-color", "gr een");
42 debug("");
43
44 debug("-style -color -line ordering (wavy yellow line-through):");
45 e.style.textDecoration = 'wavy yellow line-through';
46 testElementStyle("textDecorationLine", "text-decoration-line", "line -through");
47 testElementStyle("textDecorationStyle", "text-decoration-style", "wa vy");
48 testElementStyle("textDecorationColor", "text-decoration-color", "ye llow");
49 debug("");
50
51 debug("-color -line -style ordering (black underline solid):");
52 e.style.textDecoration = 'black underline solid';
53 testElementStyle("textDecorationLine", "text-decoration-line", "unde rline");
54 testElementStyle("textDecorationStyle", "text-decoration-style", "so lid");
55 testElementStyle("textDecorationColor", "text-decoration-color", "bl ack");
56 debug("");
57
58 debug("-color style -line -style ordering (navy dashed overline):");
59 e.style.textDecoration = 'navy dashed overline';
60 testElementStyle("textDecorationLine", "text-decoration-line", "over line");
61 testElementStyle("textDecorationStyle", "text-decoration-style", "da shed");
62 testElementStyle("textDecorationColor", "text-decoration-color", "na vy");
63 debug("");
64
65 document.body.removeChild(testContainer);
66 </script>
67 <script src="../../../js/resources/js-test-post.js"></script>
68 </body>
69 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698