Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: third_party/WebKit/LayoutTests/editing/selection/move-by-character-crash-test-textarea.html

Issue 1809963002: [Editing][CodeHealth] Use w3c testharness in editing/seletion/move-by-* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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";
24 };
25
26 if (window.testRunner)
27 testRunner.dumpAsText();
28
29 </script>
30 </body>
31 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698