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

Side by Side Diff: LayoutTests/editing/selection/skip-non-editable-rtl.html

Issue 602423002: Mixing content editable and non-editable in direction RTL (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Re-changed back to patch 1 changes Created 6 years, 2 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
« no previous file with comments | « no previous file | LayoutTests/editing/selection/skip-non-editable-rtl-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <head> 1 <head>
2 <script> 2 <script>
3 if (window.testRunner) 3 if (window.testRunner)
4 testRunner.dumpEditingCallbacks(); 4 testRunner.dumpEditingCallbacks();
5 </script> 5 </script>
6 6
7 <style> 7 <style>
8 table, td { 8 table, td {
9 border: 1px solid #aaa; 9 border: 1px solid #aaa;
10 } 10 }
11 </style> 11 </style>
12 12
13 <script> 13 <script>
14 function log(str) { 14 function log(str) {
15 var li = document.createElement("li"); 15 var li = document.createElement("li");
16 li.appendChild(document.createTextNode(str)); 16 li.appendChild(document.createTextNode(str));
17 var console = document.getElementById("console"); 17 var console = document.getElementById("console");
18 console.appendChild(li); 18 console.appendChild(li);
19 } 19 }
20 20
21 function assert(bool) { 21 function assert(bool) {
22 if (!bool) 22 if (!bool)
23 log("Failure"); 23 log("Failure");
24 else 24 else
25 log("Success"); 25 log("Success");
26 } 26 }
27 </script> 27 </script>
28 </head> 28 </head>
29 29
30 <body contentEditable="true"> 30 <body contentEditable="true" dir="rtl">
31 <p>This tests moving the caret in content of mixed editability. The caret shoul d jump to the next editable region that shares a common editable ancestor when i t reaches non-editable content.</p> 31 <p>This tests moving the caret in content of mixed editability with direction RT L. The caret should jump to the next editable region that shares a common edita ble ancestor when it reaches non-editable content.</p>
32 <div id="e1">editable content</div> 32 <div id="e1">editable content</div>
33 <table cellpadding="5" contentEditable="false"> 33 <table cellpadding="5" contentEditable="false">
34 <tr> 34 <tr>
35 <td>non-editable content</td> 35 <td>non-editable content</td>
36 <td>non-editable content</td> 36 <td>non-editable content</td>
37 <td id="e2" contentEditable="true">editable content</td> 37 <td id="e2" contentEditable="true">editable content</td>
38 </table> 38 </table>
39 <div id="e3">editable content</div> 39 <div id="e3">editable content</div>
40 40
41 <ul id="console"></ul> 41 <ul id="console"></ul>
(...skipping 19 matching lines...) Expand all
61 61
62 s.collapse(e2.firstChild, e2.firstChild.length); 62 s.collapse(e2.firstChild, e2.firstChild.length);
63 s.modify("move", "forward", "character"); 63 s.modify("move", "forward", "character");
64 s.modify("move", "forward", "character"); 64 s.modify("move", "forward", "character");
65 assert(s.anchorNode == e3.firstChild && s.anchorOffset == 0); 65 assert(s.anchorNode == e3.firstChild && s.anchorOffset == 0);
66 66
67 s.modify("move", "backward", "character"); 67 s.modify("move", "backward", "character");
68 s.modify("move", "backward", "character"); 68 s.modify("move", "backward", "character");
69 assert(s.anchorNode == e2.firstChild && s.anchorOffset == e2.firstChild.length) 69 assert(s.anchorNode == e2.firstChild && s.anchorOffset == e2.firstChild.length)
70 </script> 70 </script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/editing/selection/skip-non-editable-rtl-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698