OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <style> |
| 3 div { |
| 4 border: 30px solid transparent; |
| 5 border-image: url('resources/ring.png'); |
| 6 } |
| 7 #div1 { |
| 8 border-image-slice: calc(10 + 5); |
| 9 } |
| 10 #div2 { |
| 11 border-image-slice: calc(10 - 5); |
| 12 } |
| 13 #div3 { |
| 14 border-image-slice: calc(50% - 6); |
| 15 } |
| 16 </style> |
| 17 |
| 18 <div id="div1"></div> |
| 19 <div id="div2"></div> |
| 20 <div id="div3"></div> |
| 21 |
| 22 <script src="../../resources/js-test.js"></script> |
| 23 <script> |
| 24 if (window.testRunner) |
| 25 testRunner.dumpAsText(); |
| 26 |
| 27 function getComputedValue(selector, property) { |
| 28 return getComputedStyle(document.querySelector(selector))[property]; |
| 29 } |
| 30 |
| 31 shouldBe('getComputedValue("#div1", "borderImageSlice")', '"15"'); |
| 32 shouldBe('getComputedValue("#div2", "borderImageSlice")', '"5"'); |
| 33 shouldBe('getComputedValue("#div3", "borderImageSlice")', '"calc(-6 + 50%)"'); |
| 34 </script> |
OLD | NEW |