<html>
<head>
    <style>
        div { width: 100px; height: 100px; background-color: red; }
    </style>
    <style id="style">
        div#green { background-color: green; }
    </style>
</head>
<body>
    <!--
        Tests that re-inserting a <style> element that was created by the
        parser applies its stylesheet.
    -->
    <div id="green"></div>
    <script>
        var style = document.getElementById("style");
        var head = style.parentNode;
        head.removeChild(style);
        head.appendChild(style);
    </script>
</body>
</html>
