|
Lines 21-26
var gridWithEMElement = document.getElementById("gridWithEMElement");
a/LayoutTests/fast/css-grid-layout/resources/grid-columns-rows-get-set.js_sec1
|
| 21 |
shouldBe("getComputedStyle(gridWithEMElement, '').getPropertyValue('-webkit-grid-columns')", "'100px'"); |
21 |
shouldBe("getComputedStyle(gridWithEMElement, '').getPropertyValue('-webkit-grid-columns')", "'100px'"); |
| 22 |
shouldBe("getComputedStyle(gridWithEMElement, '').getPropertyValue('-webkit-grid-rows')", "'150px'"); |
22 |
shouldBe("getComputedStyle(gridWithEMElement, '').getPropertyValue('-webkit-grid-rows')", "'150px'"); |
| 23 |
|
23 |
|
|
|
24 |
var gridWithMinMax = document.getElementById("gridWithMinMax"); |
| 25 |
shouldBe("getComputedStyle(gridWithMinMax, '').getPropertyValue('-webkit-grid-columns')", "'minmax(10%, 15px)'"); |
| 26 |
shouldBe("getComputedStyle(gridWithMinMax, '').getPropertyValue('-webkit-grid-rows')", "'minmax(20px, 50%)'"); |
| 27 |
|
| 24 |
debug(""); |
28 |
debug(""); |
| 25 |
debug("Test the initial value"); |
29 |
debug("Test the initial value"); |
| 26 |
var element = document.createElement("div"); |
30 |
var element = document.createElement("div"); |
|
Lines 49-54
element.style.webkitGridRows = "auto";
a/LayoutTests/fast/css-grid-layout/resources/grid-columns-rows-get-set.js_sec2
|
| 49 |
shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-columns')", "'auto'"); |
53 |
shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-columns')", "'auto'"); |
| 50 |
shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-rows')", "'auto'"); |
54 |
shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-rows')", "'auto'"); |
| 51 |
|
55 |
|
|
|
56 |
element = document.createElement("div"); |
| 57 |
document.body.appendChild(element); |
| 58 |
element.style.webkitGridColumns = "minmax(55%, 45px)"; |
| 59 |
element.style.webkitGridRows = "minmax(30px, 40%)"; |
| 60 |
shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-columns')", "'minmax(55%, 45px)'"); |
| 61 |
shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-rows')", "'minmax(30px, 40%)'"); |
| 62 |
|
| 63 |
debug(""); |
| 64 |
debug("Test setting grid-columns and grid-rows back to bad minmax value through JS"); |
| 65 |
element = document.createElement("div"); |
| 66 |
document.body.appendChild(element); |
| 67 |
// No comma. |
| 68 |
element.style.webkitGridColumns = "minmax(10px 20px)"; |
| 69 |
// Only 1 argument provided. |
| 70 |
element.style.webkitGridRows = "minmax(10px)"; |
| 71 |
shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-columns')", "'none'"); |
| 72 |
shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-rows')", "'none'"); |
| 73 |
|
| 74 |
element = document.createElement("div"); |
| 75 |
document.body.appendChild(element); |
| 76 |
// Nested minmax. |
| 77 |
element.style.webkitGridColumns = "minmax(minmax(10px, 20px), 20px)"; |
| 78 |
// Only 2 arguments are allowed. |
| 79 |
element.style.webkitGridRows = "minmax(10px, 20px, 30px)"; |
| 80 |
shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-columns')", "'none'"); |
| 81 |
shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-rows')", "'none'"); |
| 82 |
|
| 83 |
element = document.createElement("div"); |
| 84 |
document.body.appendChild(element); |
| 85 |
// No breadth value. |
| 86 |
element.style.webkitGridColumns = "minmax()"; |
| 87 |
// No comma. |
| 88 |
element.style.webkitGridRows = "minmax(30px 30% 30em)"; |
| 89 |
shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-columns')", "'none'"); |
| 90 |
shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-rows')", "'none'"); |
| 91 |
|
| 52 |
debug(""); |
92 |
debug(""); |
| 53 |
debug("Test setting grid-columns and grid-rows back to 'none' through JS"); |
93 |
debug("Test setting grid-columns and grid-rows back to 'none' through JS"); |
| 54 |
element.style.webkitGridColumns = "18px"; |
94 |
element.style.webkitGridColumns = "18px"; |