| OLD | NEW |
| 1 function checkValues(element, property, propertyID, value, computedValue) | 1 function checkValues(element, property, propertyID, value, computedValue) |
| 2 { | 2 { |
| 3 window.element = element; | 3 window.element = element; |
| 4 var elementID = element.id || "element"; | 4 var elementID = element.id || "element"; |
| 5 shouldBeEqualToString("element.style." + property, value); | 5 shouldBeEqualToString("element.style." + property, value); |
| 6 shouldBeEqualToString("window.getComputedStyle(" + elementID + ", '').getPro
pertyValue('" + propertyID + "')", computedValue); | 6 shouldBeEqualToString("window.getComputedStyle(" + elementID + ", '').getPro
pertyValue('" + propertyID + "')", computedValue); |
| 7 } | 7 } |
| 8 | 8 |
| 9 function checkBadValues(element, property, propertyID, value) | 9 function checkBadValues(element, property, propertyID, value) |
| 10 { | 10 { |
| 11 var elementID = element.id || "element"; |
| 12 var initialValue = eval("window.getComputedStyle(" + elementID + " , '').get
PropertyValue('" + propertyID + "')"); |
| 11 element.style[property] = value; | 13 element.style[property] = value; |
| 12 checkValues(element, property, propertyID, "", "start"); | 14 checkValues(element, property, propertyID, "", initialValue); |
| 13 } | 15 } |
| 14 | 16 |
| 15 function checkInitialValues(element, property, propertyID, value, initial) | 17 function checkInitialValues(element, property, propertyID, value, initial) |
| 16 { | 18 { |
| 17 element.style[property] = value; | 19 element.style[property] = value; |
| 18 checkValues(element, property, propertyID, value, value); | 20 checkValues(element, property, propertyID, value, value); |
| 19 element.style[property] = "initial"; | 21 element.style[property] = "initial"; |
| 20 checkValues(element, property, propertyID, "initial", initial); | 22 checkValues(element, property, propertyID, "initial", initial); |
| 21 } | 23 } |
| 22 | 24 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 44 parentElement.appendChild(element); | 46 parentElement.appendChild(element); |
| 45 checkValues(element, property, propertyID, "", value); | 47 checkValues(element, property, propertyID, "", value); |
| 46 } | 48 } |
| 47 | 49 |
| 48 function checkSupportedValues(elementID, property) | 50 function checkSupportedValues(elementID, property) |
| 49 { | 51 { |
| 50 var value = eval("window.getComputedStyle(" + elementID + " , '').getPropert
yValue('" + property + "')"); | 52 var value = eval("window.getComputedStyle(" + elementID + " , '').getPropert
yValue('" + property + "')"); |
| 51 var value1 = eval("window.getComputedStyle(" + elementID + " , '')"); | 53 var value1 = eval("window.getComputedStyle(" + elementID + " , '')"); |
| 52 shouldBeTrue("CSS.supports('" + property + "', '" + value + "')"); | 54 shouldBeTrue("CSS.supports('" + property + "', '" + value + "')"); |
| 53 } | 55 } |
| OLD | NEW |