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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css/parsing-stroke-linejoin.html

Issue 2753013004: Apply SVG styles paint-order, stroke-linejoin, and stroke-linecap on DOM text
Patch Set: Apply SVG styles paint-order, stroke-linejoin, and stroke-linecap on DOM text Created 3 years, 9 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
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <title>Tests that all of the input values for stroke-linejoin parse correctly</t itle>
3 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/testharnessreport.js"></script>
5 <body></body>
6 <script>
7 function assert_stroke_linejoin_property_value(value, expected)
8 {
9 var div = document.createElement("div");
10 div.setAttribute("style", value);
11 document.body.appendChild(div);
12
13 var result = div.style.getPropertyValue("stroke-linejoin");
14 assert_equals(result, expected);
15 document.body.removeChild(div);
16 }
17
18 function assert_get_computed_style(value, expected)
19 {
20 var div = document.createElement("div");
21 div.setAttribute("style", value);
22 document.body.appendChild(div);
23
24 var result = window.getComputedStyle(div).strokeLinejoin;
25 assert_equals(result, expected);
26 document.body.removeChild(div);
27 }
28
29 function assert_get_computed_style_inherited(value, expected)
30 {
31 var div = document.createElement("div");
32 div.setAttribute("style", value);
33
34 var div2 = document.createElement("div");
35 div.appendChild(div2);
36
37 document.body.appendChild(div);
38
39 var result = window.getComputedStyle(div2).strokeLinejoin;
40 assert_equals(result, expected);
41 document.body.removeChild(div);
42 }
43
44 test(function(){
45 assert_get_computed_style_inherited("stroke-linejoin: miter;", "miter");
46 assert_get_computed_style_inherited("stroke-linejoin: round;", "round");
47 assert_get_computed_style_inherited("stroke-linejoin: bevel;", "bevel");
48
49 assert_get_computed_style(";", "miter");
50 assert_stroke_linejoin_property_value("stroke-linejoin: miter;", "miter");
51 assert_stroke_linejoin_property_value("stroke-linejoin: round;", "round");
52 assert_stroke_linejoin_property_value("stroke-linejoin: bevel;", "bevel");
53
54 assert_stroke_linejoin_property_value("stroke-linejoin: mitr;", "");
55 assert_stroke_linejoin_property_value("stroke-linejoin: bevl;", "");
56 assert_stroke_linejoin_property_value("stroke-linejoin: 10px;", "");
57 assert_stroke_linejoin_property_value("stroke-linejoin: 10%;", "");
58 });
59 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698