<!DOCTYPE html>
<html>
    <head>
        <style>
            .region {
                -webkit-flow-from: flow;
            }
            .content {
                -webkit-flow-into: redirectFlow;
            }
        </style>
    </head>
    <body>
        <p>Test that cloning and removing a region child that has a content node child does not crash or assert.</p>
        <p>On success you should see PASS below.<p>
        <p>PASS</p>
        <div class="region">
            <div id="cloneTarget">
                <div class="content"></div>
            </div>
        </div>
        <script>
            if (window.testRunner)
                window.testRunner.dumpAsText();
            function test() {
                var elem = document.getElementById("cloneTarget");
                parent = elem.parentNode;
                var new_elem = document.createElement("div");
                new_elem.innerHTML = elem.innerHTML;
                for (i in elem.attributes) {
                    if (elem.attributes[i].specified) {
                        new_elem.setAttribute(elem.attributes[i].name, elem.attributes[i].value);
                    }
                }
                parent.insertBefore(new_elem, elem);
                parent.removeChild(elem);
            }
            setTimeout(test, 0);
        </script>
    </body>
</html>
