| 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 { |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 document.body.appendChild(parentElement); | 26 document.body.appendChild(parentElement); |
| 27 parentElement.style[property] = value; | 27 parentElement.style[property] = value; |
| 28 checkValues(parentElement, property, propertyID, value, value); | 28 checkValues(parentElement, property, propertyID, value, value); |
| 29 | 29 |
| 30 var element = document.createElement("div"); | 30 var element = document.createElement("div"); |
| 31 parentElement.appendChild(element); | 31 parentElement.appendChild(element); |
| 32 element.style[property] = "inherit"; | 32 element.style[property] = "inherit"; |
| 33 checkValues(element, property, propertyID, "inherit", value); | 33 checkValues(element, property, propertyID, "inherit", value); |
| 34 } | 34 } |
| 35 | 35 |
| 36 function checkLegacyValues(property, propertyID, value) | 36 function checkLegacyValues(property, propertyID, value, computedValue) |
| 37 { | 37 { |
| 38 var parentElement = document.createElement("div"); | 38 var parentElement = document.createElement("div"); |
| 39 document.body.appendChild(parentElement); | 39 document.body.appendChild(parentElement); |
| 40 parentElement.style[property] = value; | |
| 41 checkValues(parentElement, property, propertyID, value, value); | |
| 42 | |
| 43 var element = document.createElement("div"); | 40 var element = document.createElement("div"); |
| 44 parentElement.appendChild(element); | 41 parentElement.appendChild(element); |
| 45 checkValues(element, property, propertyID, "", value); | 42 |
| 43 parentElement.style[property] = value; |
| 44 |
| 45 checkValues(parentElement, property, propertyID, value, value); |
| 46 checkValues(element, property, propertyID, "", computedValue); |
| 46 } | 47 } |
| OLD | NEW |