Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / inserting / insert-paragraph-separator-tab-span.html
blob98b6216154973ecec591184539761fd56d0047e5
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <div contenteditable title="1: last visible position" style="word-wrap: break-word; width: 10ex; border: solid thin black;"><span class="Apple-tab-span" style="white-space:pre"> </span></div>
5 <div contenteditable title="0: first visible position" style="word-wrap: break-word; width: 10ex; border: solid thin black;"><span class="Apple-tab-span" style="white-space:pre"> </span></div>
6 <div contenteditable title="1: before tab span" style="word-wrap: break-word; width: 10ex; border: solid thin black;">hi, <span class="Apple-tab-span" style="white-space:pre"> </span> rocks</div>
7 <div contenteditable title="2: after tab span" style="word-wrap: break-word; width: 10ex; border: solid thin black;">hi, <span class="Apple-tab-span" style="white-space:pre"> </span> rocks</div>
8 <script src="../../resources/dump-as-markup.js"></script>
9 <script>
11 Markup.description('This test ensures WebKit avoids cloning Apple tab span when inserting a paragraph separator.\n'+
12 'Only tab should be inside a Apple tab span in the following tests.');
14 function runTest(div) {
15 var offset = div.title.substr(0, div.title.indexOf(':'));
16 window.getSelection().collapse(div, offset);
17 document.execCommand("InsertParagraph");
18 document.execCommand("InsertText", false, "hello world WebKit ");
19 Markup.dump(div, div.title.substr(div.title.indexOf(': ') + 2));
22 var divs = document.getElementsByTagName('div');
23 var tests = new Array();
24 for (var i = 0; i < divs.length; i++)
25 tests.push(divs[i]);
27 for (i in tests)
28 runTest(tests[i]);
30 </script>
31 </body>
32 </html>