| <!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> |