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

Side by Side Diff: LayoutTests/css3/filters/script-tests/filter-property-computed-style.js

Issue 1194733002: Adding the 'filter' context attribute to 2D canvas (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: applied corrections Created 5 years, 5 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 unified diff | Download patch
OLDNEW
1 description("Test the computed style of the -webkit-filter property."); 1 description("Test the computed style of the -webkit-filter property.");
2 2
3 // These have to be global for the test helpers to see them. 3 // These have to be global for the test helpers to see them.
4 var filterStyle; 4 var filterStyle;
5 var styleElement = document.createElement("style"); 5 var styleElement = document.createElement("style");
6 document.head.appendChild(styleElement); 6 document.head.appendChild(styleElement);
7 var stylesheet = styleElement.sheet; 7 var stylesheet = styleElement.sheet;
8 8
9 function testComputedFilterRule(description, rule, expectedValue) 9 function testComputedFilterRule(description, rule, expectedValue)
10 { 10 {
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 testComputedFilterRule("Color then three values", 83 testComputedFilterRule("Color then three values",
84 "drop-shadow(red 1px 2px 3px)", "drop-shadow(rgb(255, 0, 0) 1px 2px 3px)"); 84 "drop-shadow(red 1px 2px 3px)", "drop-shadow(rgb(255, 0, 0) 1px 2px 3px)");
85 85
86 testComputedFilterRule("Three values then color", 86 testComputedFilterRule("Three values then color",
87 "drop-shadow(1px 2px 3px red)", "drop-shadow(rgb(255, 0, 0) 1px 2px 3px)"); 87 "drop-shadow(1px 2px 3px red)", "drop-shadow(rgb(255, 0, 0) 1px 2px 3px)");
88 88
89 testComputedFilterRule("Color then three values with zero length", 89 testComputedFilterRule("Color then three values with zero length",
90 "drop-shadow(#abc 0 0 0)", "drop-shadow(rgb(170, 187, 204) 0px 0px 0px)"); 90 "drop-shadow(#abc 0 0 0)", "drop-shadow(rgb(170, 187, 204) 0px 0px 0px)");
91 91
92 testComputedFilterRule("Three values with zero length", 92 testComputedFilterRule("Three values with zero length",
93 "drop-shadow(0 0 0)", "drop-shadow(rgba(0, 0, 0, 0) 0px 0px 0px)"); 93 "drop-shadow(0 0 0)", "drop-shadow(rgb(0, 0, 0) 0px 0px 0px)");
94 94
95 testComputedFilterRule("Two values no color", 95 testComputedFilterRule("Two values no color",
96 "drop-shadow(1px 2px)", "drop-shadow(rgba(0, 0, 0, 0) 1px 2px 0px)"); 96 "drop-shadow(1px 2px)", "drop-shadow(rgb(0, 0, 0) 1px 2px 0px)");
97 97
98 testComputedFilterRule("Multiple operations", 98 testComputedFilterRule("Multiple operations",
99 "grayscale(0.5) sepia(0.25) saturate(0.75) hue-rotate(35deg) invert(0.2) opa city(0.9) blur(5px)"); 99 "grayscale(0.5) sepia(0.25) saturate(0.75) hue-rotate(35deg) invert(0.2) opa city(0.9) blur(5px)");
100 100
101 testComputedFilterRule("Percentage values", 101 testComputedFilterRule("Percentage values",
102 "grayscale(50%) sepia(25%) saturate(75%) invert(20%) opacity(90%) brightness (60%) contrast(30%)", 102 "grayscale(50%) sepia(25%) saturate(75%) invert(20%) opacity(90%) brightness (60%) contrast(30%)",
103 "grayscale(0.5) sepia(0.25) saturate(0.75) invert(0.2) opacity(0.9) brightne ss(0.6) contrast(0.3)"); 103 "grayscale(0.5) sepia(0.25) saturate(0.75) invert(0.2) opacity(0.9) brightne ss(0.6) contrast(0.3)");
104 104
105 successfullyParsed = true; 105 successfullyParsed = true;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698