18 font-family: Verdana, Arial, sans-serif;
29 ul.menu li { padding:
3px; padding-left:
1.6em; padding-right:
5px; text-indent: -
1.1em !important; text-indent: -
.5em; }
30 ul.menu li:first-letter { font-size:
20px;line-height:
10px; }
33 <title>Editing Test
</title>
37 <div contenteditable
id=
"root" class=
"editing" style=
"width:120px;">
38 <ul class=
"menu" id=
"test">
39 <li>· <a href=
"detail.asp?cat=7">Appetizers
</a></li>
40 <li>· <a href=
"detail.asp?cat=13">Soups & Salads
</a></li>
41 <li>· <a href=
"detail.asp?cat=5">Sandwiches & Burgers
</a></li>
42 <li>· <a href=
"detail.asp?cat=14">Steak & Ribs
</a></li>
43 <li>· <a href=
"detail.asp?cat=11">Seafood
</a></li>
44 <li>· <a href=
"detail.asp?cat=17">Combos
</a></li>
49 Specifically checks test case in bug:
50 <rdar://problem/4244976> reproducible hang at ocharleys.com in VisiblePosition::initDownstream
52 <script src=
"../../resources/js-test.js"></script>
54 function $(id
) { return document
.getElementById(id
); }
56 internals
.settings
.setEditingBehavior('mac');
57 var range
= document
.createRange();
58 range
.setStart($("test").querySelectorAll("li")[0], 0);
59 var selection
= window
.getSelection();
60 selection
.removeAllRanges();
61 selection
.addRange(range
);
62 for (var i
= 0; i
< 6; ++i
)
63 selection
.modify('extend', 'forward', 'word');
64 shouldBeEqualToString('selection.type', 'Range');
65 shouldBe('selection.anchorNode', '$("test").querySelectorAll("li")[0].childNodes[0]');
66 shouldBe('selection.anchorOffset', '0');
67 shouldBe('selection.focusNode', '$("test").querySelectorAll("li a")[3].firstChild');
68 shouldBe('selection.focusOffset', '4');
69 if (window
.testRunner
)
70 $('container').outerHTML
= '';