11 pre
= document
.getElementById('console');
12 pre
.appendChild(document
.createTextNode(str
+ '\n'));
16 if (window
.testRunner
)
17 testRunner
.dumpAsText()
19 var str
= '____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________'
20 var div
= document
.getElementById('highlighted');
21 div
.innerHTML
= '<div>' + str
+ '\n</div>'
25 var sel
= getSelection();
26 sel
.collapse(div
.firstChild
, 0);
28 var range
= sel
.getRangeAt(0);
29 var span
= document
.createElement('SPAN');
30 range
.insertNode(span
);
35 <body onload=
"runTest()">
36 This tests that inserting a span into a selection of a div with lots of non-word-broken characters doesn't crash.
37 <div id=
"highlighted"></div>
38 <pre id=
"console"></pre>