<html>
<head>
    <script>
    function runTest() {
        if (window.layoutTestController)
            layoutTestController.dumpAsText()

        var div = document.createElement("div");
        div.innerText = "\nText\nwith\nnewlines\n\n";

        alert(div.innerHTML)
        if (div.innerHTML != '<br>Text<br>with<br>newlines<br><br>')
            return;
            
        div.innerText = "\rText\rwith\rnewlines\r\r";

        if (div.innerHTML != '<br>Text<br>with<br>newlines<br><br>')
            return;

        div.innerText = "\r\nText\r\nwith\r\nnewlines\r\n\r\n";

        if (div.innerHTML != '<br>Text<br>with<br>newlines<br><br>')
            return;
            
        document.getElementById('result').innerHTML='SUCCESS'
    }
    </script>
</head>
<body onload="runTest()">
    This tests that setInnerText converts newlines to &lt;br&gt; elements correctly. If the test is successful, the text "SUCCESS" should be shown below.
    <div id="result">FAILURE</div>
</body>
</html>
