Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / selection / move-by-character-crash-test-textarea.html
blob63fb48c76c50606c7aafce023bda7d9ccd1d405a
1 <!DOCTYPE html>
2 <html>
3 <body>
4 This test sets caret at the beginning of backward text and moving the character to left and right. WebKit should not crash and you should see PASS below:
5 <textarea id="editor">&#8238;LTR
6 </textarea>
7 <script>
8 onload = function() {
9 var sel = window.getSelection();
10 sel.empty();
11 var test = document.getElementById("editor");
12 test.focus();
13 test.selectionDirection = 'none';
14 test.selectionStart = 0;
15 test.selectionEnd = 0;
16 getSelection().modify("move", "left", "character");
17 getSelection().modify("move", "left", "character");
18 test.selectionDirection = 'none';
19 test.selectionStart = 1;
20 test.selectionEnd = 1;
21 getSelection().modify("move", "right", "character");
22 getSelection().modify("move", "right", "character");
23 document.body.innerHTML = "PASS";
26 if (window.testRunner)
27 testRunner.dumpAsText();
29 </script>
30 </body>
31 </html>