blob: 088ac943b3fa50520081ae3666dc5f3c35041274 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<style>
#grid {
display: grid;
grid-auto-flow: stack;
}
.absolute {
position: absolute;
}
</style>
<script type="text/javascript">
if (window.testRunner)
testRunner.dumpAsText();
</script>
</head>
<body>
<p>This tests checks that adding grid items when some of them are positioned does not crash.</p>
<div id="grid">
<div></div>
<div class="absolute"></div>
</div>
<script>
var grid = document.getElementById("grid");
grid.offsetTop;
var newItem1 = document.createElement("div");
grid.appendChild(newItem1);
var newItem2 = document.createElement("div");
newItem2.className = "absolute";
grid.appendChild(newItem2);
</script>
</body>
</html>