5 <style type=
"text/css"> /* pertinent to test cases */
6 .quote:before { content: "*"; }
7 .quote:after { content: "*"; }
9 .bidi:before { content: "aפb"; }
10 .bidi:after { content: "aפb"; }
12 <script src=
"../../resources/js-test.js"></script>
16 <p>This webpage should not hang when we try to move beyond the quotes.
</p>
18 <div contenteditable=
"true" id=
"test1">
19 <span class=
"quote">content
</span>
22 <div contenteditable=
"true" id=
"test2">
23 a
<span class=
"quote">content
</span>a
26 <div contenteditable=
"true" id=
"test3">
27 <span class=
"bidi">content
</span>
30 <div contenteditable=
"true" id=
"test4">
31 a
<span class=
"bidi">content
</span>a
34 <div id=
"console"></div>
37 var edit
= document
.getElementById('test1');
40 for (var i
= 0; i
< 9; ++i
)
41 window
.getSelection().modify('move', 'right', 'character');
43 for (var i
= 0; i
< 9; ++i
)
44 window
.getSelection().modify('move', 'left', 'character');
46 var edit
= document
.getElementById('test2');
49 for (var i
= 0; i
< 11; ++i
)
50 window
.getSelection().modify('move', 'right', 'character');
52 for (var i
= 0; i
< 11; ++i
)
53 window
.getSelection().modify('move', 'left', 'character');
55 var edit
= document
.getElementById('test3');
58 for (var i
= 0; i
< 9; ++i
)
59 window
.getSelection().modify('move', 'right', 'character');
61 for (var i
= 0; i
< 9; ++i
)
62 window
.getSelection().modify('move', 'left', 'character');
64 var edit
= document
.getElementById('test4');
67 for (var i
= 0; i
< 11; ++i
)
68 window
.getSelection().modify('move', 'right', 'character');
70 for (var i
= 0; i
< 11; ++i
)
71 window
.getSelection().modify('move', 'left', 'character');