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

Side by Side Diff: LayoutTests/editing/selection/mixed-editability-3.html

Issue 14794012: Make contenteditable="false" element as atomic node for selection motion (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 2013-05-27T14:00 Created 7 years, 6 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 | Annotate | Revision Log
OLDNEW
1 <script> 1 <script src="../../fast/js/resources/js-test-pre.js"></script>
2 if (window.testRunner) 2 <script src="./resources/js-test-selection-shared.js"></script>
3 testRunner.dumpEditingCallbacks();
4 </script>
5 <p>This tests moving the caret forward through content of mixed editability. Th e caret should move down one line from the editable piece to the editable piece that's embedded in a non-editable piece.</p>
6 3
7 <div contenteditable="true" id="test"> 4 <div contenteditable="true" id="test">
8 editable 5 <span id="e1">1 editable</span>
9 <table border="1" contenteditable="false"><tr><td contenteditable="true">editabl e</td></tr></table> 6 <table border="1" contenteditable="false"><tr><td contenteditable="true">editabl e</td></tr></table>
10 editable 7 <span id="e2">2 editable</span>
11 </div> 8 </div>
12 9
13 <script> 10 <script>
14 var e = document.getElementById("test"); 11 description('This tests moving the caret forward through content of mixed editab ility. The caret should not be in non-editable piece.');
15 var s = window.getSelection();
16 12
17 s.setPosition(e, 0); 13 testCaretMotion({
14 'direction': 'both',
15 'granularity': 'line',
16 'origin': 'e1',
17 'target': 'e2',
18 });
18 19
19 s.modify("move", "forward", "line"); 20 testCaretMotion({
21 'direction': 'both',
22 'granularity': 'line',
23 'origin': 'e1',
24 'originOffset': -1,
25 'target': 'e2',
26 'targetOffset': -1,
27 });
28
29 if (window.testRunner)
30 $('test').outerHTML = '';
20 </script> 31 </script>
32 <script src="../../fast/js/resources/js-test-post.js"></script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698