blob: 1f4373ab41ce4a7b50e8f176fa75238063b1fae6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
<script>
function test()
{
if (window.layoutTestController)
layoutTestController.dumpAsText();
var ta = document.getElementById("ta");
ta.focus();
document.execCommand("InsertLineBreak");
var result = ta.value;
if (result == "\n")
document.write("<p>Hooray, the test was successful!</p>");
else
document.write("<p>The test failed, result was '" + result.replace("\n", "\\n") + "'.</p>");
}
</script>
<body onload="test()">
<p><textarea id="ta"></textarea></p>
|