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

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: Add expected file too 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
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..a278b0db01bb343ed7afbe2ee4c96e7d973b8eda
--- /dev/null
+++ b/LayoutTests/fast/backgrounds/mask-box-image-width.html
@@ -0,0 +1,44 @@
+<!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;
+ }
+
+ .test *:nth-child(2) {
Julien - ping for review 2013/11/24 22:53:01 Let's avoid nth-child selector, which makes the te
davve 2013/11/25 22:15:16 In combination with the next issue (about adding m
+ -webkit-mask-box-image-width: auto;
+ }
+
+ .test *:nth-child(3) {
+ -webkit-mask-box-image-width: 1;
+ }
+
+ .test *:nth-child(4) {
+ -webkit-mask-box-image-width: 0px;
+ }
Julien - ping for review 2013/11/24 22:53:01 If we are going to do some testing, how about perc
davve 2013/11/25 22:15:16 Done.
+ </style>
+ </head>
+ <body>
+ <div class="test">
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ </div>
+ <script>
+ description("Test getComputedStyle().webkitMaskBoxImageWidth");
Julien - ping for review 2013/11/24 22:53:01 That's a bit tense for a description IMO (it is ac
davve 2013/11/25 22:15:16 Done.
+ var elements = document.querySelectorAll('.test *');
+ shouldBeEqualToString("getComputedStyle(elements[0]).webkitMaskBoxImageWidth", "auto"); /* initial */
+ shouldBeEqualToString("getComputedStyle(elements[1]).webkitMaskBoxImageWidth", "auto");
+ shouldBeEqualToString("getComputedStyle(elements[2]).webkitMaskBoxImageWidth", "1");
+ shouldBeEqualToString("getComputedStyle(elements[3]).webkitMaskBoxImageWidth", "0px");
+ </script>
+ </body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/fast/backgrounds/mask-box-image-width-expected.txt » ('j') | Source/core/css/CSSToStyleMap.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698