blob: 17b36f4ca5f3c7e291b8ee37c662abf2f0c902f7 [file] [log] [blame]
description('Test that setting and getting display: grid and inline-grid works as expected');
debug("Test getting |display| set through CSS");
var gridElement = document.getElementById("gridElement");
var inlineGridElement = document.getElementById("inlineGridElement");
shouldBe("getComputedStyle(gridElement, '').getPropertyValue('display')", "'grid'");
shouldBe("getComputedStyle(inlineGridElement, '').getPropertyValue('display')", "'inline-grid'");
debug("");
debug("Test getting and setting display through JS");
var element = document.createElement("div");
document.body.appendChild(element);
shouldBe("getComputedStyle(element, '').getPropertyValue('display')", "'block'");
element.style.display = "grid";
shouldBe("getComputedStyle(element, '').getPropertyValue('display')", "'grid'");
element = document.createElement("div");
document.body.appendChild(element);
shouldBe("getComputedStyle(element, '').getPropertyValue('display')", "'block'");
element.style.display = "inline-grid";
shouldBe("getComputedStyle(element, '').getPropertyValue('display')", "'inline-grid'");