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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css/parsing-paint-order.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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/css/parsing-stroke-linecap.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <title>Tests that all of the input values for paint-order parse correctly</title >
3 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/testharnessreport.js"></script>
5 <body></body>
6 <script>
7 function assert_paint_order_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("paint-order");
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).paintOrder;
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).paintOrder;
40 assert_equals(result, expected);
41 document.body.removeChild(div);
42 }
43
44 test(function(){
45 assert_get_computed_style_inherited("paint-order: fill;", "fill stroke markers ");
46 assert_get_computed_style_inherited("paint-order: stroke;", "stroke fill marke rs");
47 assert_get_computed_style_inherited("paint-order: markers;", "markers fill str oke");
48
49 assert_get_computed_style(";", "fill stroke markers");
50 assert_paint_order_property_value("paint-order: fill;", "fill");
51 assert_paint_order_property_value("paint-order: fill stroke;", "fill");
52 assert_paint_order_property_value("paint-order: fill markers;", "fill markers" );
53 assert_paint_order_property_value("paint-order: fill stroke markers;", "fill") ;
54 assert_paint_order_property_value("paint-order: fill markers stroke;", "fill m arkers");
55
56 assert_paint_order_property_value("paint-order: stroke;", "stroke");
57 assert_paint_order_property_value("paint-order: stroke fill;", "stroke");
58 assert_paint_order_property_value("paint-order: stroke markers;", "stroke mark ers");
59 assert_paint_order_property_value("paint-order: stroke fill markers;", "stroke ");
60 assert_paint_order_property_value("paint-order: stroke markers fill;", "stroke markers");
61
62 assert_paint_order_property_value("paint-order: markers;", "markers");
63 assert_paint_order_property_value("paint-order: markers fill;", "markers");
64 assert_paint_order_property_value("paint-order: markers stroke;", "markers str oke");
65 assert_paint_order_property_value("paint-order: markers fill stroke;", "marker s");
66 assert_paint_order_property_value("paint-order: markers stroke fill;", "marker s stroke");
67
68 assert_paint_order_property_value("paint-order: fil;", "");
69 assert_paint_order_property_value("paint-order: fill markrs;", "");
70 assert_paint_order_property_value("paint-order: 10px;", "");
71 assert_paint_order_property_value("paint-order: 10%;", "");
72 });
73 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/css/parsing-stroke-linecap.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698