blob: 08804b2341189b749ffa1fa9f842a358556014b7 [file] [log] [blame]
<html>
<head id="b">
<style id="a" type="text/css" media="screen">
#box {
-webkit-animation-duration: 2s;
-webkit-animation-timing-function: linear;
-webkit-animation-name: anim;
background-color: blue;
width: 100px;
height: 100px;
}
@-webkit-keyframes anim {
from { transform: rotate(0) scale(1,1); }
to { transform: rotate(360deg) scale(2,4); }
}
</style>
</head>
<body>
<div id="box">
</div>
<p>This should not crash</p>
</body>
</html>
<script>
var element;
function crash() {
// trigger style processing
document.alinkColor = "aaa";
// now remove the body and insert it in a different location
element = document.body;
element.parentNode.removeChild(element);
document.getElementById("a").parentNode.insertBefore(element, document.getElementById("a").nextSibling);
setTimeout(cleanup, 0);
}
function cleanup() {
document.getElementById("b").parentNode.insertBefore(element, document.getElementById("b").nextSibling);
if (window.testRunner)
testRunner.notifyDone();
}
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
crash();
</script>