<html>
<head>
<script>
if (window.testRunner) {
    testRunner.dumpAsText();
    testRunner.waitUntilDone();
}

if (!window.gc)
{
    window.gc = function()
    {
        if (window.GCController)
            return GCController.collect();
        for (var i = 0; i < 10000; i++)
            var s = new String("abc");
    }
}

function load()
{
    style = document.createElement('style');
    style.textContent = '@-webkit-keyframes anim { from { color: green } }';
    document.head.appendChild(style);
    rule = document.styleSheets[0].cssRules[0].findRule('from');
    document.head.removeChild(style);
    setTimeout(crash, 0);
}

function crash()
{
    gc();
    obj = rule.style.parentRule;
    if (window.testRunner)
        testRunner.notifyDone()
}
</script>
</head>
<body onload="load()">PASS</body>
</html>
