Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / selection / css-pseudo-element-hang.html
blob53446fec6c4713f75ff605a70130f43ee4ee23e2
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta charset="utf-8">
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"; }
11 </style>
12 <script src="../../resources/js-test.js"></script>
13 <title></title>
14 </head>
15 <body>
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>
20 </div>
22 <div contenteditable="true" id="test2">
23 a<span class="quote">content</span>a
24 </div>
26 <div contenteditable="true" id="test3">
27 <span class="bidi">content</span>
28 </div>
30 <div contenteditable="true" id="test4">
31 a<span class="bidi">content</span>a
32 </div>
34 <div id="console"></div>
35 <script>
37 var edit = document.getElementById('test1');
38 edit.focus();
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');
47 edit.focus();
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');
56 edit.focus();
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');
65 edit.focus();
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');
74 </script>
75 </body>
76 </html>