blob: ae02de2c6609cf6c8fd709f486f969c1b0611959 [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 { -webkit-transform: rotate(0) scale(1,1); }
to { -webkit-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>