| <!DOCTYPE html> |
| <html> |
| <head> |
| <title>This tests that we can adjust the contining block for absolute positioned element when containing block changes.</title> |
| <style> |
| div { |
| width: 100px; |
| height: 100px; |
| background-color: green; |
| top: 100px; |
| left: 100px; |
| } |
| </style> |
| </head> |
| <body> |
| PASS if no crash or assert. |
| <div id=container style="background-color: blue; position: absolute;"></div> |
| <script> |
| if (window.testRunner) { |
| testRunner.waitUntilDone(); |
| testRunner.dumpAsText(); |
| } |
| var container = document.getElementById("container"); |
| setTimeout(function() { |
| for (var i = 0; i < 50; ++i) { |
| var newChild = document.createElement("div"); |
| newChild.style.position = "absolute"; |
| container.appendChild(newChild); |
| } |
| setTimeout(function() { |
| container.style.position = "static"; |
| setTimeout(function() { |
| var newChild = document.createElement("div"); |
| newChild.style.position = "absolute"; |
| container.appendChild(newChild); |
| if (window.testRunner) |
| testRunner.notifyDone(); |
| }, 0); |
| }, 0); |
| }, 0); |
| </script> |
| </body> |
| </html> |