blob: 92eaf38f465c07a225cdd141b66d0b93c3104d7b [file] [log] [blame]
Test parsing and computation of CSS image filter() function.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS innerStyle("background-image", "filter(none, blur(3px))") is "filter(none, blur(3px))"
PASS innerStyle("background-image", "filter(none, url(#a))") is "filter(none, url(\"#a\"))"
PASS innerStyle("background-image", "filter(none, url(#a))") is "filter(none, url(\"#a\"))"
PASS innerStyle("background-image", "filter(none, url(#a) url(#b))") is "filter(none, url(\"#a\") url(\"#b\"))"
PASS innerStyle("background-image", "filter(none, grayscale(1) url(#a))") is "filter(none, grayscale(1) url(\"#a\"))"
PASS innerStyle("background-image", "filter(none, grayscale(1))") is "filter(none, grayscale(1))"
PASS innerStyle("background-image", "filter(none, grayscale(50%))") is "filter(none, grayscale(50%))"
PASS innerStyle("background-image", "filter(none, grayscale(1.0))") is "filter(none, grayscale(1))"
PASS innerStyle("background-image", "filter(none, grayscale(0))") is "filter(none, grayscale(0))"
PASS innerStyle("background-image", "filter(none, grayscale(0.5) grayscale(0.25))") is "filter(none, grayscale(0.5) grayscale(0.25))"
PASS innerStyle("background-image", "filter(none, sepia(1))") is "filter(none, sepia(1))"
PASS innerStyle("background-image", "filter(none, sepia(50%))") is "filter(none, sepia(50%))"
PASS innerStyle("background-image", "filter(none, sepia(1.0))") is "filter(none, sepia(1))"
PASS innerStyle("background-image", "filter(none, sepia(0))") is "filter(none, sepia(0))"
PASS innerStyle("background-image", "filter(none, sepia(0.5) sepia(0.25))") is "filter(none, sepia(0.5) sepia(0.25))"
PASS innerStyle("background-image", "filter(none, sepia(0.5) grayscale(0.25))") is "filter(none, sepia(0.5) grayscale(0.25))"
PASS innerStyle("background-image", "filter(none, saturate(1))") is "filter(none, saturate(1))"
PASS innerStyle("background-image", "filter(none, saturate(50%))") is "filter(none, saturate(50%))"
PASS innerStyle("background-image", "filter(none, saturate(250%))") is "filter(none, saturate(250%))"
PASS innerStyle("background-image", "filter(none, saturate(1.0))") is "filter(none, saturate(1))"
PASS innerStyle("background-image", "filter(none, saturate(5.5))") is "filter(none, saturate(5.5))"
PASS innerStyle("background-image", "filter(none, saturate(0))") is "filter(none, saturate(0))"
PASS innerStyle("background-image", "filter(none, saturate(0.5) saturate(0.25))") is "filter(none, saturate(0.5) saturate(0.25))"
PASS innerStyle("background-image", "filter(none, saturate(0.5) grayscale(0.25))") is "filter(none, saturate(0.5) grayscale(0.25))"
PASS innerStyle("background-image", "filter(none, hue-rotate(10deg))") is "filter(none, hue-rotate(10deg))"
PASS innerStyle("background-image", "filter(none, hue-rotate(10.0deg))") is "filter(none, hue-rotate(10deg))"
PASS innerStyle("background-image", "filter(none, hue-rotate(10rad))") is "filter(none, hue-rotate(10rad))"
PASS innerStyle("background-image", "filter(none, hue-rotate(10grad))") is "filter(none, hue-rotate(10grad))"
PASS innerStyle("background-image", "filter(none, hue-rotate(0.5turn))") is "filter(none, hue-rotate(0.5turn))"
PASS innerStyle("background-image", "filter(none, hue-rotate(0))") is "filter(none, hue-rotate(0deg))"
PASS innerStyle("background-image", "filter(none, hue-rotate(10deg) grayscale(0.25))") is "filter(none, hue-rotate(10deg) grayscale(0.25))"
PASS innerStyle("background-image", "filter(none, invert(1))") is "filter(none, invert(1))"
PASS innerStyle("background-image", "filter(none, invert(50%))") is "filter(none, invert(50%))"
PASS innerStyle("background-image", "filter(none, invert(1.0))") is "filter(none, invert(1))"
PASS innerStyle("background-image", "filter(none, invert(0))") is "filter(none, invert(0))"
PASS innerStyle("background-image", "filter(none, invert(0.5) invert(0.25))") is "filter(none, invert(0.5) invert(0.25))"
PASS innerStyle("background-image", "filter(none, invert(0.5) grayscale(0.25))") is "filter(none, invert(0.5) grayscale(0.25))"
PASS innerStyle("background-image", "filter(none, opacity(1))") is "filter(none, opacity(1))"
PASS innerStyle("background-image", "filter(none, opacity(50%))") is "filter(none, opacity(50%))"
PASS innerStyle("background-image", "filter(none, opacity(1.0))") is "filter(none, opacity(1))"
PASS innerStyle("background-image", "filter(none, opacity(0))") is "filter(none, opacity(0))"
PASS innerStyle("background-image", "filter(none, opacity(0.5) opacity(0.25))") is "filter(none, opacity(0.5) opacity(0.25))"
PASS innerStyle("background-image", "filter(none, opacity(0.5) grayscale(0.25))") is "filter(none, opacity(0.5) grayscale(0.25))"
PASS innerStyle("background-image", "filter(none, brightness(1))") is "filter(none, brightness(1))"
PASS innerStyle("background-image", "filter(none, brightness(50%))") is "filter(none, brightness(50%))"
PASS innerStyle("background-image", "filter(none, brightness(1.0))") is "filter(none, brightness(1))"
PASS innerStyle("background-image", "filter(none, brightness(0))") is "filter(none, brightness(0))"
PASS innerStyle("background-image", "filter(none, brightness(0.5) brightness(0.25))") is "filter(none, brightness(0.5) brightness(0.25))"
PASS innerStyle("background-image", "filter(none, brightness(0.5) grayscale(0.25))") is "filter(none, brightness(0.5) grayscale(0.25))"
PASS innerStyle("background-image", "filter(none, brightness(-1.1))") is ""
PASS innerStyle("background-image", "filter(none, brightness(101%))") is "filter(none, brightness(101%))"
PASS innerStyle("background-image", "filter(none, grayscale(0.25) brightness(0.5))") is "filter(none, grayscale(0.25) brightness(0.5))"
PASS innerStyle("background-image", "filter(none, contrast(1))") is "filter(none, contrast(1))"
PASS innerStyle("background-image", "filter(none, contrast(50%))") is "filter(none, contrast(50%))"
PASS innerStyle("background-image", "filter(none, contrast(250%))") is "filter(none, contrast(250%))"
PASS innerStyle("background-image", "filter(none, contrast(1.0))") is "filter(none, contrast(1))"
PASS innerStyle("background-image", "filter(none, contrast(0))") is "filter(none, contrast(0))"
PASS innerStyle("background-image", "filter(none, contrast(2))") is "filter(none, contrast(2))"
PASS innerStyle("background-image", "filter(none, contrast(0.5) contrast(0.25))") is "filter(none, contrast(0.5) contrast(0.25))"
PASS innerStyle("background-image", "filter(none, contrast(0.5) grayscale(0.25))") is "filter(none, contrast(0.5) grayscale(0.25))"
PASS innerStyle("background-image", "filter(none, grayscale(0.25) contrast(0.5))") is "filter(none, grayscale(0.25) contrast(0.5))"
PASS innerStyle("background-image", "filter(none, blur(0))") is "filter(none, blur(0px))"
PASS innerStyle("background-image", "filter(none, blur(10px))") is "filter(none, blur(10px))"
PASS innerStyle("background-image", "filter(none, drop-shadow(red 1px 2px 3px))") is "filter(none, drop-shadow(red 1px 2px 3px))"
PASS innerStyle("background-image", "filter(none, drop-shadow(1px 2px 3px red))") is "filter(none, drop-shadow(red 1px 2px 3px))"
PASS innerStyle("background-image", "filter(none, drop-shadow(#abc 0 0 0))") is "filter(none, drop-shadow(rgb(170, 187, 204) 0px 0px 0px))"
PASS innerStyle("background-image", "filter(none, drop-shadow(0 0 0))") is "filter(none, drop-shadow(0px 0px 0px))"
PASS innerStyle("background-image", "filter(none, drop-shadow(1px 2px))") is "filter(none, drop-shadow(1px 2px))"
PASS innerStyle("background-image", "filter(none, grayscale(0.5) sepia(0.25) saturate(0.75) hue-rotate(35deg) invert(0.2) opacity(0.9) blur(5px) drop-shadow(green 1px 2px 3px))") is "filter(none, grayscale(0.5) sepia(0.25) saturate(0.75) hue-rotate(35deg) invert(0.2) opacity(0.9) blur(5px) drop-shadow(green 1px 2px 3px))"
PASS innerStyle("background-image", "filter(radial-gradient(ellipse closest-corner, white, black), hue-rotate(90deg))") is "filter(radial-gradient(closest-corner, white, black), hue-rotate(90deg))"
PASS innerStyle("background-image", "filter(radial-gradient(circle closest-side at 50px 50%, white, black), hue-rotate(90deg))") is "filter(radial-gradient(circle closest-side at 50px 50%, white, black), hue-rotate(90deg))"
PASS innerStyle("background-image", "filter(radial-gradient(ellipse closest-corner at 20px 50px, white, black), hue-rotate(90deg))") is "filter(radial-gradient(closest-corner at 20px 50px, white, black), hue-rotate(90deg))"
PASS innerStyle("background-image", "filter(linear-gradient(white, black), hue-rotate(90deg))") is "filter(linear-gradient(white, black), hue-rotate(90deg))"
PASS innerStyle("background-image", "filter(linear-gradient(to top left, white, black), hue-rotate(90deg))") is "filter(linear-gradient(to left top, white, black), hue-rotate(90deg))"
PASS innerStyle("background-image", "filter(linear-gradient(0deg, white -20%, blue, black 120%), hue-rotate(90deg))") is "filter(linear-gradient(0deg, white -20%, blue, black 120%), hue-rotate(90deg))"
PASS innerStyle("background-image", "filter(-webkit-cross-fade(url(image1.png), url(image2.png), 50%), contrast(0.5))") is "filter(-webkit-cross-fade(url(\"image1.png\"), url(\"image2.png\"), 0.5), contrast(0.5))"
PASS innerStyle("background-image", "filter(url(image1.png), brightness(50%))") is "filter(url(\"image1.png\"), brightness(50%))"
PASS innerStyle("background-image", "filter(url('image1.png'), brightness(50%))") is "filter(url(\"image1.png\"), brightness(50%))"
PASS innerStyle("border-image-source", "filter(url(image1.png), invert(50%))") is "filter(url(\"image1.png\"), invert(50%))"
PASS innerStyle("-webkit-mask-image", "filter(url(image1.png), invert(50%))") is "filter(url(\"image1.png\"), invert(50%))"
PASS innerStyle("-webkit-mask-box-image-source", "filter(url(image1.png), invert(50%))") is "filter(url(\"image1.png\"), invert(50%))"
PASS innerStyle("content", "filter(url(image1.png), invert(50%))") is "filter(url(\"image1.png\"), invert(50%))"
PASS innerStyle("background-image", "filter()") is ""
PASS computedStyle("background-image", "filter()") is "none"
PASS innerStyle("background-image", "filter(url(image1.png))") is ""
PASS computedStyle("background-image", "filter(url(image1.png))") is "none"
PASS innerStyle("background-image", "filter(url(image1.png), )") is ""
PASS computedStyle("background-image", "filter(url(image1.png), )") is "none"
PASS innerStyle("background-image", "filter(url(image1.png) brightness(50%))") is ""
PASS computedStyle("background-image", "filter(url(image1.png) brightness(50%))") is "none"
PASS innerStyle("background-image", "filter(brightness(50%) url(image1.png))") is ""
PASS computedStyle("background-image", "filter(brightness(50%) url(image1.png))") is "none"
PASS innerStyle("background-image", "filter(brightness(50%), url(image1.png))") is ""
PASS computedStyle("background-image", "filter(brightness(50%), url(image1.png))") is "none"
PASS innerStyle("background-image", "filter(url(image1.png) url(#filter))") is ""
PASS computedStyle("background-image", "filter(url(image1.png) url(#filter))") is "none"
PASS innerStyle("background-image", "filter(brightness(50%))") is ""
PASS computedStyle("background-image", "filter(brightness(50%))") is "none"
PASS innerStyle("background-image", "filter(brightness(50%), )") is ""
PASS computedStyle("background-image", "filter(brightness(50%), )") is "none"
PASS innerStyle("background-image", "filter(url(image1.png), brightness(50%), brightness(50%))") is ""
PASS computedStyle("background-image", "filter(url(image1.png), brightness(50%), brightness(50%))") is "none"
PASS innerStyle("background-image", "filter(url(image1.png) url(image2.png), brightness(50%))") is ""
PASS computedStyle("background-image", "filter(url(image1.png) url(image2.png), brightness(50%))") is "none"
PASS innerStyle("background-image", "filter(url(image1.png), url(image2.png), brightness(50%))") is ""
PASS computedStyle("background-image", "filter(url(image1.png), url(image2.png), brightness(50%))") is "none"
PASS innerStyle("background-image", "filter(invalidToken.png, blur(3px))") is ""
PASS computedStyle("background-image", "filter(invalidToken.png, blur(3px))") is "none"
PASS successfullyParsed is true
TEST COMPLETE