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

Unified Diff: third_party/WebKit/LayoutTests/editing/selection/modify_move/move_forward_line_mixed_editability.html

Issue 1806423003: Convert editing/selection layout tests to use w3c test harness, volume 6 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698