| 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 assert_equals(eval('element.style.' + property), value, property + ' specifi
ed value is not what it should..'); | 5 assert_equals(eval('element.style.' + property), value, property + ' specifi
ed value is not what it should.'); |
| 6 assert_equals(eval("window.getComputedStyle(" + elementID + ", '').getProper
tyValue('" + propertyID + "')"), computedValue, property + " is not what is shou
ld."); | 6 assert_equals(eval("window.getComputedStyle(" + elementID + ", '').getProper
tyValue('" + propertyID + "')"), computedValue, property + " is not what is shou
ld."); |
| 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"; | 11 var elementID = element.id || "element"; |
| 12 var initialValue = eval("window.getComputedStyle(" + elementID + " , '').get
PropertyValue('" + propertyID + "')"); | 12 var initialValue = eval("window.getComputedStyle(" + elementID + " , '').get
PropertyValue('" + propertyID + "')"); |
| 13 element.style[property] = value; | 13 element.style[property] = value; |
| 14 checkValues(element, property, propertyID, "", initialValue); | 14 checkValues(element, property, propertyID, "", initialValue); |
| 15 } | 15 } |
| (...skipping 30 matching lines...) Expand all Loading... |
| 46 parentElement.appendChild(element); | 46 parentElement.appendChild(element); |
| 47 checkValues(element, property, propertyID, "", value); | 47 checkValues(element, property, propertyID, "", value); |
| 48 } | 48 } |
| 49 | 49 |
| 50 function checkSupportedValues(elementID, property) | 50 function checkSupportedValues(elementID, property) |
| 51 { | 51 { |
| 52 var value = eval("window.getComputedStyle(" + elementID + " , '').getPropert
yValue('" + property + "')"); | 52 var value = eval("window.getComputedStyle(" + elementID + " , '').getPropert
yValue('" + property + "')"); |
| 53 var value1 = eval("window.getComputedStyle(" + elementID + " , '')"); | 53 var value1 = eval("window.getComputedStyle(" + elementID + " , '')"); |
| 54 shouldBeTrue("CSS.supports('" + property + "', '" + value + "')"); | 54 shouldBeTrue("CSS.supports('" + property + "', '" + value + "')"); |
| 55 } | 55 } |
| OLD | NEW |