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

Side by Side Diff: third_party/WebKit/LayoutTests/css3/calc/border-image-slice-with-calc-computed.html

Issue 1835403003: Allow number-percentage calc() in border-image-slice (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Another approach Created 4 years, 7 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
OLDNEW
(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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698