upload tizen1.0 source
[framework/web/webkit-efl.git] / LayoutTests / editing / execCommand / indent-with-style.html
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>
18
19 <script type="text/javascript">
20
21 if (window.layoutTestController) {
22     layoutTestController.dumpEditingCallbacks();
23     layoutTestController.dumpAsText();
24 }
25
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();
31
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>