blob: bd3a9b8100dd189484ab6ad624719a54309e22d2 [file] [log] [blame]
<html>
<body>
<p>This tests removing underline which is applied outside of editable root. We shouldn't be removing underline.</p>
<div id="e">
<div style="text-decoration: underline;" contenteditable="false"><div id="test" contenteditable="true">text</div></div>
</div>
<ul>
<li>Before:<span id="c1"></span></li>
<li>After:<span id="c2"></span></li>
</ul>
<script type="text/javascript">
if (window.testRunner)
testRunner.dumpAsText();
var e = document.getElementById('e');
document.getElementById('c1').appendChild(document.createTextNode(e.innerHTML));
var s = window.getSelection();
var r = document.createRange();
r.setStart(document.getElementById('test'),0);
r.setEnd(document.getElementById('test'),1);
s.removeAllRanges();
s.addRange(r);
document.execCommand("underline", false, null);
document.getElementById('c2').appendChild(document.createTextNode(e.innerHTML));
</script>