<!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;"></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 = "fixed";
    container.appendChild(newChild);
  }
  setTimeout(function() {
    container.style.transform = "rotate(10deg)";
    setTimeout(function() {
      container.style.transform = "";
      setTimeout(function() {
        var newChild = document.createElement("div");
        newChild.style.position = "absolute";
        document.body.appendChild(newChild);
        if (window.testRunner)
          testRunner.notifyDone();
      }, 0);
    }, 0);
  }, 0);
}, 0);
</script>
</body>
</html>
