| Index: third_party/WebKit/LayoutTests/fast/css/parsing-paint-order.html
|
| diff --git a/third_party/WebKit/LayoutTests/fast/css/parsing-paint-order.html b/third_party/WebKit/LayoutTests/fast/css/parsing-paint-order.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..9886af645e12b515e5df2a61f997f6bb01a9a9fc
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/fast/css/parsing-paint-order.html
|
| @@ -0,0 +1,73 @@
|
| +<!DOCTYPE html>
|
| +<title>Tests that all of the input values for paint-order parse correctly</title>
|
| +<script src="../../resources/testharness.js"></script>
|
| +<script src="../../resources/testharnessreport.js"></script>
|
| +<body></body>
|
| +<script>
|
| +function assert_paint_order_property_value(value, expected)
|
| +{
|
| + var div = document.createElement("div");
|
| + div.setAttribute("style", value);
|
| + document.body.appendChild(div);
|
| +
|
| + var result = div.style.getPropertyValue("paint-order");
|
| + assert_equals(result, expected);
|
| + document.body.removeChild(div);
|
| +}
|
| +
|
| +function assert_get_computed_style(value, expected)
|
| +{
|
| + var div = document.createElement("div");
|
| + div.setAttribute("style", value);
|
| + document.body.appendChild(div);
|
| +
|
| + var result = window.getComputedStyle(div).paintOrder;
|
| + assert_equals(result, expected);
|
| + document.body.removeChild(div);
|
| +}
|
| +
|
| +function assert_get_computed_style_inherited(value, expected)
|
| +{
|
| + var div = document.createElement("div");
|
| + div.setAttribute("style", value);
|
| +
|
| + var div2 = document.createElement("div");
|
| + div.appendChild(div2);
|
| +
|
| + document.body.appendChild(div);
|
| +
|
| + var result = window.getComputedStyle(div2).paintOrder;
|
| + assert_equals(result, expected);
|
| + document.body.removeChild(div);
|
| +}
|
| +
|
| +test(function(){
|
| + assert_get_computed_style_inherited("paint-order: fill;", "fill stroke markers");
|
| + assert_get_computed_style_inherited("paint-order: stroke;", "stroke fill markers");
|
| + assert_get_computed_style_inherited("paint-order: markers;", "markers fill stroke");
|
| +
|
| + assert_get_computed_style(";", "fill stroke markers");
|
| + assert_paint_order_property_value("paint-order: fill;", "fill");
|
| + assert_paint_order_property_value("paint-order: fill stroke;", "fill");
|
| + assert_paint_order_property_value("paint-order: fill markers;", "fill markers");
|
| + assert_paint_order_property_value("paint-order: fill stroke markers;", "fill");
|
| + assert_paint_order_property_value("paint-order: fill markers stroke;", "fill markers");
|
| +
|
| + assert_paint_order_property_value("paint-order: stroke;", "stroke");
|
| + assert_paint_order_property_value("paint-order: stroke fill;", "stroke");
|
| + assert_paint_order_property_value("paint-order: stroke markers;", "stroke markers");
|
| + assert_paint_order_property_value("paint-order: stroke fill markers;", "stroke");
|
| + assert_paint_order_property_value("paint-order: stroke markers fill;", "stroke markers");
|
| +
|
| + assert_paint_order_property_value("paint-order: markers;", "markers");
|
| + assert_paint_order_property_value("paint-order: markers fill;", "markers");
|
| + assert_paint_order_property_value("paint-order: markers stroke;", "markers stroke");
|
| + assert_paint_order_property_value("paint-order: markers fill stroke;", "markers");
|
| + assert_paint_order_property_value("paint-order: markers stroke fill;", "markers stroke");
|
| +
|
| + assert_paint_order_property_value("paint-order: fil;", "");
|
| + assert_paint_order_property_value("paint-order: fill markrs;", "");
|
| + assert_paint_order_property_value("paint-order: 10px;", "");
|
| + assert_paint_order_property_value("paint-order: 10%;", "");
|
| +});
|
| +</script>
|
|
|