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>
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
++)