| Index: third_party/WebKit/LayoutTests/fast/css/round-up-all-line-width-less-than-1-greater-than-0.html
|
| diff --git a/third_party/WebKit/LayoutTests/fast/css/round-up-all-line-width-less-than-1-greater-than-0.html b/third_party/WebKit/LayoutTests/fast/css/round-up-all-line-width-less-than-1-greater-than-0.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..1257e32d7b091d67e234583b7be815dd83f314bc
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/fast/css/round-up-all-line-width-less-than-1-greater-than-0.html
|
| @@ -0,0 +1,37 @@
|
| +<!DOCTYPE html>
|
| +<script src="../../resources/testharness.js"></script>
|
| +<script src="../../resources/testharnessreport.js"></script>
|
| +
|
| +<body>
|
| +</body>
|
| +
|
| +<script>
|
| +var values = [
|
| + {input:"0px", expected:"0px"},
|
| + {input:"0.9px", expected:"1px"},
|
| + {input:"1px", expected:"1px"},
|
| + {input:"0.2px", expected:"1px"},
|
| + {input:"0.9pt", expected:"1px"},
|
| + {input:"1pt", expected:"1px"},
|
| + {input:"0.2pt", expected:"1px"},
|
| + {input:"1.9pt", expected:"2px"},
|
| + {input:"1pt", expected:"1px"},
|
| + {input:"1.2pt", expected:"1px"},
|
| + {input:"2.1px", expected:"2px"},
|
| + {input:"2.9px", expected:"2px"}
|
| +];
|
| +
|
| +for (var value of values) {
|
| + var div = document.createElement("div");
|
| + div.style = "outline: solid " + value.input + " red; margin-bottom: 20px;";
|
| + document.body.appendChild(div);
|
| +}
|
| +
|
| +test(function() {
|
| + var targets = document.querySelectorAll("div");
|
| + for (var i=0; i < targets.length; i++) {
|
| + assert_equals(getComputedStyle(targets[i]).outlineWidth, values[i].expected);
|
| + }
|
| +}, "Test that chrome rounds up all borders/outlines when they are less than 1px but greater than 0px but floors all other borders.");
|
| +
|
| +</script>
|
|
|