Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / execCommand / indent-with-style.html
blob3277f066ce26410f4af3432ad81700779bf6f1ae
1 <html>
2 <body>
3 This tests indenting two and three. You should see two and three indented and with the same background color as one and four.
4 <p>
5 <a href="https://bugs.webkit.org/show_bug.cgi?id=23995">Bug 23995</a>
6 </p>
7 <div id="e" contenteditable="true">
8 <div><span class="Apple-style-span" style="background-color: rgb(255, 0, 0);">one</span></div>
9 <div id="test1"><span class="Apple-style-span" style="background-color: rgb(255, 0, 0);">two</span></div>
10 <div id="test2"><span class="Apple-style-span" style="background-color: rgb(255, 0, 0);">three</span></div>
11 <div><span class="Apple-style-span" style="background-color: rgb(255, 0, 0);">four</span></div>
12 </div>
13 <br>
14 <ul>
15 <li>Before ordered list:<span id="c1"></span></li>
16 <li>After ordered:<span id="c2"></span></li>
17 </ul>
19 <script type="text/javascript">
21 if (window.testRunner) {
22 testRunner.dumpEditingCallbacks();
23 testRunner.dumpAsText();
26 var e = document.getElementById('e');
27 var t1 = document.getElementById("test1");
28 var t2 = document.getElementById("test2");
29 var s = window.getSelection();
30 var r = document.createRange();
32 r.setStart(t1,0);
33 r.setEnd(t2,1);
34 s.removeAllRanges();
35 s.addRange(r);
36 document.getElementById('c1').appendChild(document.createTextNode(e.innerHTML));
37 document.execCommand("Indent", false, "");
38 document.getElementById('c2').appendChild(document.createTextNode(e.innerHTML));
39 </script>