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

Unified 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, 8 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/css3/calc/border-image-slice-with-calc-computed.html
diff --git a/third_party/WebKit/LayoutTests/css3/calc/border-image-slice-with-calc-computed.html b/third_party/WebKit/LayoutTests/css3/calc/border-image-slice-with-calc-computed.html
new file mode 100644
index 0000000000000000000000000000000000000000..eb1fff455cf54b4a3a27deeea809a07bfb3b4ae3
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/css3/calc/border-image-slice-with-calc-computed.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<style>
+div {
+ border: 30px solid transparent;
+ border-image: url('resources/ring.png');
+}
+#div1 {
+ border-image-slice: calc(10 + 5);
+}
+#div2 {
+ border-image-slice: calc(10 - 5);
+}
+#div3 {
+ border-image-slice: calc(50% - 6);
+}
+</style>
+
+<div id="div1"></div>
+<div id="div2"></div>
+<div id="div3"></div>
+
+<script src="../../resources/js-test.js"></script>
+<script>
+if (window.testRunner)
+ testRunner.dumpAsText();
+
+function getComputedValue(selector, property) {
+ return getComputedStyle(document.querySelector(selector))[property];
+}
+
+shouldBe('getComputedValue("#div1", "borderImageSlice")', '"15"');
+shouldBe('getComputedValue("#div2", "borderImageSlice")', '"5"');
+shouldBe('getComputedValue("#div3", "borderImageSlice")', '"calc(-6 + 50%)"');
+</script>

Powered by Google App Engine
This is Rietveld 408576698