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

Unified Diff: LayoutTests/fast/backgrounds/mask-box-image-width.html

Issue 81123002: Factor out common BorderImageLength code in CSSToStyleMap (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Address review comments Created 7 years, 1 month 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
« no previous file with comments | « no previous file | LayoutTests/fast/backgrounds/mask-box-image-width-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/backgrounds/mask-box-image-width.html
diff --git a/LayoutTests/fast/backgrounds/mask-box-image-width.html b/LayoutTests/fast/backgrounds/mask-box-image-width.html
new file mode 100644
index 0000000000000000000000000000000000000000..b3075eada0b0a4a828d0c708f9842f0d478f9c0e
--- /dev/null
+++ b/LayoutTests/fast/backgrounds/mask-box-image-width.html
@@ -0,0 +1,39 @@
+<!doctype html>
+<html>
+ <head>
+ <script src="../../resources/js-test.js"></script>
+ <style>
+ .test * {
+ -webkit-mask-box-image-source: url(resources/dot.png);
+ -webkit-mask-box-image-slice: 3 fill;
+ width: 100px;
+ height: 100px;
+ background-color: blue;
+ visibility: hidden;
+ }
+ </style>
+ </head>
+ <body>
+ <div>
+ <div class="test"></div>
+ </div>
+ <script>
+ description("This test checks that webkitMaskBoxImageWidth" +
+ " is correctly parsed and returned from getComputedStyle().");
+ var tests = [
+ ["auto", "auto"],
+ ["1", "1"],
+ ["0px", "0px"],
+ ["97%", "97%"],
+ ["inherit", "auto"],
+ ["initial", "auto"]
+ ];
+ var testElm = document.querySelector('.test');
+ shouldBeEqualToString("getComputedStyle(testElm).webkitMaskBoxImageWidth", "auto");
+ for (var i in tests) {
+ testElm.style["webkitMaskBoxImageWidth"] = tests[i][0];
+ shouldBeEqualToString("getComputedStyle(testElm).webkitMaskBoxImageWidth", tests[i][1]);
+ }
+ </script>
+ </body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/fast/backgrounds/mask-box-image-width-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698