Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / style / textdecoration-outside-of-rooteditable.html
blobbd3a9b8100dd189484ab6ad624719a54309e22d2
1 <html>
2 <body>
3 <p>This tests removing underline which is applied outside of editable root. We shouldn't be removing underline.</p>
4 <div id="e">
5 <div style="text-decoration: underline;" contenteditable="false"><div id="test" contenteditable="true">text</div></div>
6 </div>
8 <ul>
9 <li>Before:<span id="c1"></span></li>
10 <li>After:<span id="c2"></span></li>
11 </ul>
13 <script type="text/javascript">
15 if (window.testRunner)
16 testRunner.dumpAsText();
18 var e = document.getElementById('e');
19 document.getElementById('c1').appendChild(document.createTextNode(e.innerHTML));
21 var s = window.getSelection();
22 var r = document.createRange();
23 r.setStart(document.getElementById('test'),0);
24 r.setEnd(document.getElementById('test'),1);
25 s.removeAllRanges();
26 s.addRange(r);
27 document.execCommand("underline", false, null);
29 document.getElementById('c2').appendChild(document.createTextNode(e.innerHTML));
31 </script>