| OLD | NEW |
| 1 <script src="../../fast/js/resources/js-test-pre.js"></script> | 1 <script> |
| 2 <script src="./resources/js-test-selection-shared.js"></script> | 2 if (window.testRunner) |
| 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> |
| 3 | 6 |
| 4 <div contenteditable="true" id="test"> | 7 <div contenteditable="true" id="test"> |
| 5 <span id="e1">1 editable</span> | 8 editable |
| 6 <table border="1" contenteditable="false"><tr><td contenteditable="true">editabl
e</td></tr></table> | 9 <table border="1" contenteditable="false"><tr><td contenteditable="true">editabl
e</td></tr></table> |
| 7 <span id="e2">2 editable</span> | 10 editable |
| 8 </div> | 11 </div> |
| 9 | 12 |
| 10 <script> | 13 <script> |
| 11 description('This tests moving the caret forward through content of mixed editab
ility. The caret should not be in non-editable piece.'); | 14 var e = document.getElementById("test"); |
| 15 var s = window.getSelection(); |
| 12 | 16 |
| 13 testCaretMotion({ | 17 s.setPosition(e, 0); |
| 14 'direction': 'both', | |
| 15 'granularity': 'line', | |
| 16 'origin': 'e1', | |
| 17 'target': 'e2', | |
| 18 }); | |
| 19 | 18 |
| 20 testCaretMotion({ | 19 s.modify("move", "forward", "line"); |
| 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 = ''; | |
| 31 </script> | 20 </script> |
| 32 <script src="../../fast/js/resources/js-test-post.js"></script> | |
| OLD | NEW |