Index: third_party/WebKit/LayoutTests/editing/selection/modify_move/move_forward_line_mixed_editability.html |
diff --git a/third_party/WebKit/LayoutTests/editing/selection/modify_move/move_forward_line_mixed_editability.html b/third_party/WebKit/LayoutTests/editing/selection/modify_move/move_forward_line_mixed_editability.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..d8589e09ab4dbe60a5d3849b028349f0f5f40cb3 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/editing/selection/modify_move/move_forward_line_mixed_editability.html |
@@ -0,0 +1,27 @@ |
+<!doctype html> |
+<script src="../../../resources/testharness.js"></script> |
+<script src="../../../resources/testharnessreport.js"></script> |
+<p>This tests moving the caret forward through content of mixed editability. |
+The caret should move down one line from the editable piece to the editable |
+piece that's embedded in a non-editable piece.</p> |
+<div contenteditable id="sample"> |
+editable1 |
+<table border="1" contenteditable="false"> |
+<tr><td contenteditable id="anchor">editable2</td></tr> |
+</table> |
+editable3 |
+</div> |
+<div id="log"></div> |
+<script> |
+test(function() { |
+ var selection = window.getSelection(); |
+ selection.collapse(document.getElementById('sample'), 0); |
+ selection.modify('move', 'forward', 'line'); |
+ |
+ var anchor = document.getElementById('anchor').firstChild; |
+ assert_equals(selection.anchorNode, anchor, 'anchorNode'); |
+ assert_equals(selection.anchorOffset, 0, 'anchorOffset'); |
+ assert_equals(selection.focusNode, anchor, 'focusNode'); |
+ assert_equals(selection.focusOffset, 0, 'focusOffset'); |
+}, 'skip over uneditable part'); |
+</script> |