<!DOCTYPE html>
<html>
<head>
<script>
    if (window.testRunner)
        testRunner.dumpAsText();

    var runcount = 0;
    function go() {
        runcount++;
        if (runcount > 2)
            return;

        i.type = "foo";
        i.select();
        i.type = "search";

        document.onsearch = document.body.onload;

        document.execCommand("insertHTML", false, "");
    }
</script>
</head>
<body onload=go()>
<input id="i" type="checkbox" incremental="incremental">
Test passes if WebKit doesn't crash.
</body>
</html>