Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / style / textdecoration-outside-of-unsplittable-element.html
blob2ede103785421436826b3f07a14534d0b6264c20
1 <html>
2 <body>
3 <p>This tests removing underline which is applied outside of unsplittable element. We shouldn't be removing underline.</p>
4 <div id="e">
5 <table style="text-decoration: underline;">
6 <tr>
7 <td id="test" contenteditable="true">hello</td>
8 <td>world</td>
9 </tr>
10 <tr>
11 <td>webkit</td>
12 <td>rocks</td>
13 </tr>
14 </table>
15 </div>
17 <ul>
18 <li>Before:<span id="c1"></span></li>
19 <li>After:<span id="c2"></span></li>
20 </ul>
22 <script type="text/javascript">
24 if (window.testRunner)
25 testRunner.dumpAsText();
27 var e = document.getElementById('e');
28 document.getElementById('c1').appendChild(document.createTextNode(e.innerHTML));
30 var s = window.getSelection();
31 var r = document.createRange();
32 r.setStart(document.getElementById('test'),0);
33 r.setEnd(document.getElementById('test'),1);
34 s.removeAllRanges();
35 s.addRange(r);
36 document.execCommand("underline", false, null);
38 document.getElementById('c2').appendChild(document.createTextNode(e.innerHTML));
40 </script>