| OLD | NEW |
| 1 function testGridDefinitionsValues(element, columnValue, rowValue, computedColum
nValue, computedRowValue) | 1 function testGridDefinitionsValues(element, columnValue, rowValue, computedColum
nValue, computedRowValue) |
| 2 { | 2 { |
| 3 window.element = element; | 3 window.element = element; |
| 4 var elementID = element.id || "element"; | 4 var elementID = element.id || "element"; |
| 5 shouldBeEqualToString("window.getComputedStyle(" + elementID + ", '').getPro
pertyValue('grid-template-columns')", computedColumnValue || columnValue); | 5 shouldBeEqualToString("window.getComputedStyle(" + elementID + ", '').getPro
pertyValue('grid-template-columns')", computedColumnValue || columnValue); |
| 6 shouldBeEqualToString("window.getComputedStyle(" + elementID + ", '').getPro
pertyValue('grid-template-rows')", computedRowValue || rowValue); | 6 shouldBeEqualToString("window.getComputedStyle(" + elementID + ", '').getPro
pertyValue('grid-template-rows')", computedRowValue || rowValue); |
| 7 } | 7 } |
| 8 | 8 |
| 9 function testGridDefinitionsSetJSValues(columnValue, rowValue, computedColumnVal
ue, computedRowValue, jsColumnValue, jsRowValue) | 9 function testGridDefinitionsSetJSValues(columnValue, rowValue, computedColumnVal
ue, computedRowValue, jsColumnValue, jsRowValue) |
| 10 { | 10 { |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 | 37 |
| 38 function testGridDefinitionsSetBadJSValues(columnValue, rowValue) | 38 function testGridDefinitionsSetBadJSValues(columnValue, rowValue) |
| 39 { | 39 { |
| 40 window.element = document.createElement("div"); | 40 window.element = document.createElement("div"); |
| 41 document.body.appendChild(element); | 41 document.body.appendChild(element); |
| 42 element.style.gridTemplateColumns = columnValue; | 42 element.style.gridTemplateColumns = columnValue; |
| 43 element.style.gridTemplateRows = rowValue; | 43 element.style.gridTemplateRows = rowValue; |
| 44 // We can't use testSetJSValues as element.style.gridTemplateRows returns ""
. | 44 // We can't use testSetJSValues as element.style.gridTemplateRows returns ""
. |
| 45 testGridDefinitionsValues(element, "none", "none"); | 45 testGridDefinitionsValues(element, "none", "none"); |
| 46 document.body.removeChild(element); | 46 document.body.removeChild(element); |
| 47 } | 47 } |
| 48 |
| 49 function checkGridAutoFlowSetCSSValue(elementId, expectedValue) |
| 50 { |
| 51 shouldBe("window.getComputedStyle(" + elementId + ", '').getPropertyValue('g
rid-auto-flow')", "'" + expectedValue + "'"); |
| 52 } |
| 53 |
| 54 function checkGridAutoFlowSetJSValue(newValue, expectedStyleValue, expectedCompu
tedStyleValue) |
| 55 { |
| 56 element = document.createElement("div"); |
| 57 document.body.appendChild(element); |
| 58 if (newValue) |
| 59 element.style.gridAutoFlow = newValue; |
| 60 shouldBe("element.style.gridAutoFlow", "'" + expectedStyleValue + "'"); |
| 61 shouldBe("window.getComputedStyle(element, '').getPropertyValue('grid-auto-f
low')", "'" + expectedComputedStyleValue + "'"); |
| 62 document.body.removeChild(element); |
| 63 } |
| OLD | NEW |