34 lines
1.2 KiB
HTML
34 lines
1.2 KiB
HTML
<html>
|
|
<head>
|
|
<script>
|
|
function log(msg)
|
|
{
|
|
document.getElementById('console').appendChild(document.createTextNode(msg + '\n'));
|
|
}
|
|
|
|
function test()
|
|
{
|
|
if (window.testRunner)
|
|
testRunner.dumpAsText();
|
|
var td = document.getElementById("td");
|
|
var text = td.firstChild;
|
|
var s = window.getSelection();
|
|
s.setPosition(text, 3);
|
|
document.execCommand("InsertNewlineInQuotedContent");
|
|
var tables = document.getElementsByTagName("table");
|
|
if (tables.length == 1)
|
|
log("Test Passed");
|
|
else
|
|
log ("Test Failed");
|
|
}
|
|
</script>
|
|
</head>
|
|
<body onload="test()">
|
|
<p>This tests that inserting a newline inside a table still works and doesn't break the table apart, even when in quoted content.</p>
|
|
<div contenteditable="true">
|
|
<blockquote type="cite"><table border="1" id="tb"><tr><td id="td">foobar</td></tr></table></blockquote>
|
|
</div>
|
|
<pre id="console"></pre>
|
|
</body>
|
|
</html>
|