Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <script src="../../resources/testharness.js"></script> | |
| 3 <script src="../../resources/testharnessreport.js"></script> | |
| 4 | |
| 5 <body> | |
| 6 </body> | |
| 7 | |
| 8 <script> | |
| 9 var values = [ | |
|
nainar
2015/10/29 04:07:55
Indented
| |
| 10 {input:"0px", expected:"0px"}, | |
| 11 {input:"0.9px", expected:"1px"}, | |
| 12 {input:"1px", expected:"1px"}, | |
| 13 {input:"0.2px", expected:"1px"}, | |
| 14 {input:"0.9pt", expected:"1px"}, | |
| 15 {input:"1pt", expected:"1px"}, | |
| 16 {input:"0.2pt", expected:"1px"}, | |
| 17 {input:"1.9pt", expected:"2px"}, | |
| 18 {input:"1pt", expected:"1px"}, | |
| 19 {input:"1.2pt", expected:"1px"}, | |
| 20 {input:"2.1px", expected:"2px"}, | |
| 21 {input:"2.9px", expected:"2px"}]; | |
| 22 | |
| 23 for (var value of values) { | |
| 24 var div = document.createElement("div"); | |
| 25 div.style = "outline: solid " + value.input + " red; margin-bottom: 20px;"; | |
| 26 document.body.appendChild(div); | |
| 27 } | |
| 28 | |
| 29 test(function() { | |
| 30 var targets = document.querySelectorAll("div"); | |
| 31 for (var i=0; i < targets.length; i++) { | |
| 32 assert_equals(getComputedStyle(targets[i]).outlineWidth, values[i].expected) ; | |
| 33 } | |
| 34 }, "Test that chrome rounds up all borders/outlines when they are less than 1px but greater than 0px but floors all other borders."); | |
| 35 | |
| 36 </script> | |
| OLD | NEW |