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> |