| OLD | NEW | 
|---|
| 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 26 matching lines...) Expand all  Loading... | 
| 37 testComputedFilterRule("Multiple values", "sepia(0.5) sepia(0.25)"); | 37 testComputedFilterRule("Multiple values", "sepia(0.5) sepia(0.25)"); | 
| 38 testComputedFilterRule("Rule combinations", "sepia(0.5) grayscale(0.25)"); | 38 testComputedFilterRule("Rule combinations", "sepia(0.5) grayscale(0.25)"); | 
| 39 testComputedFilterRule("Integer value", "saturate(1)"); | 39 testComputedFilterRule("Integer value", "saturate(1)"); | 
| 40 testComputedFilterRule("Float value converts to integer", "saturate(1.0)", "satu
     rate(1)"); | 40 testComputedFilterRule("Float value converts to integer", "saturate(1.0)", "satu
     rate(1)"); | 
| 41 testComputedFilterRule("Zero value", "saturate(0)"); | 41 testComputedFilterRule("Zero value", "saturate(0)"); | 
| 42 testComputedFilterRule("No values", "saturate()", "saturate(1)"); | 42 testComputedFilterRule("No values", "saturate()", "saturate(1)"); | 
| 43 testComputedFilterRule("Multiple values", "saturate(0.5) saturate(0.25)"); | 43 testComputedFilterRule("Multiple values", "saturate(0.5) saturate(0.25)"); | 
| 44 testComputedFilterRule("Rule combinations", "saturate(0.5) grayscale(0.25)"); | 44 testComputedFilterRule("Rule combinations", "saturate(0.5) grayscale(0.25)"); | 
| 45 testComputedFilterRule("Degrees value as integer", "hue-rotate(10deg)"); | 45 testComputedFilterRule("Degrees value as integer", "hue-rotate(10deg)"); | 
| 46 testComputedFilterRule("Degrees float value converts to integer", "hue-rotate(10
     .0deg)", "hue-rotate(10deg)"); | 46 testComputedFilterRule("Degrees float value converts to integer", "hue-rotate(10
     .0deg)", "hue-rotate(10deg)"); | 
| 47 testComputedFilterRule("Radians value", "hue-rotate(10rad)", "hue-rotate(572.957
     795130823deg)"); | 47 testComputedFilterRule("Radians value", "hue-rotate(10rad)", "hue-rotate(572.958
     deg)"); | 
| 48 testComputedFilterRule("Gradians value", "hue-rotate(10grad)", "hue-rotate(9deg)
     "); | 48 testComputedFilterRule("Gradians value", "hue-rotate(10grad)", "hue-rotate(9deg)
     "); | 
| 49 testComputedFilterRule("Turns value", "hue-rotate(0.5turn)", "hue-rotate(180deg)
     "); | 49 testComputedFilterRule("Turns value", "hue-rotate(0.5turn)", "hue-rotate(180deg)
     "); | 
| 50 testComputedFilterRule("Zero value", "hue-rotate(0)", "hue-rotate(0deg)"); | 50 testComputedFilterRule("Zero value", "hue-rotate(0)", "hue-rotate(0deg)"); | 
| 51 testComputedFilterRule("No values", "hue-rotate()", "hue-rotate(0deg)"); | 51 testComputedFilterRule("No values", "hue-rotate()", "hue-rotate(0deg)"); | 
| 52 testComputedFilterRule("Rule combinations", "hue-rotate(10deg) grayscale(0.25)")
     ; | 52 testComputedFilterRule("Rule combinations", "hue-rotate(10deg) grayscale(0.25)")
     ; | 
| 53 testComputedFilterRule("Integer value", "invert(1)"); | 53 testComputedFilterRule("Integer value", "invert(1)"); | 
| 54 testComputedFilterRule("Float value converts to integer", "invert(1.0)", "invert
     (1)"); | 54 testComputedFilterRule("Float value converts to integer", "invert(1.0)", "invert
     (1)"); | 
| 55 testComputedFilterRule("Zero value", "invert(0)"); | 55 testComputedFilterRule("Zero value", "invert(0)"); | 
| 56 testComputedFilterRule("No values", "invert()", "invert(1)"); | 56 testComputedFilterRule("No values", "invert()", "invert(1)"); | 
| 57 testComputedFilterRule("Multiple values", "invert(0.5) invert(0.25)"); | 57 testComputedFilterRule("Multiple values", "invert(0.5) invert(0.25)"); | 
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 96     "drop-shadow(1px 2px)", "drop-shadow(rgba(0, 0, 0, 0) 1px 2px 0px)"); | 96     "drop-shadow(1px 2px)", "drop-shadow(rgba(0, 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; | 
| OLD | NEW | 
|---|