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

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

Issue 2446893006: Convert editing/selection/4932260-[123].html to utilize w3c test harness (Closed)
Patch Set: 2016-10-26T16:41:10 Created 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/editing/selection/modify_move/move_around_image.html
diff --git a/third_party/WebKit/LayoutTests/editing/selection/modify_move/move_around_image.html b/third_party/WebKit/LayoutTests/editing/selection/modify_move/move_around_image.html
new file mode 100644
index 0000000000000000000000000000000000000000..640569c3812d78c2a9b6071e8d90379dcbccb186
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/editing/selection/modify_move/move_around_image.html
@@ -0,0 +1,61 @@
+<!doctype html>
+<script src="../../../resources/testharness.js"></script>
+<script src="../../../resources/testharnessreport.js"></script>
+<script src="../../assert_selection.js"></script>
+<script>
+test(() => assert_selection(
+ [
+ '<div contenteditable>',
+ '|foo <img src="../../resources/abe.png"> bar',
+ '</div>',
+ ].join(''),
+ selection => selection.modify('move', 'forward', 'sentence'),
+ [
+ '<div contenteditable>',
+ 'foo <img src="../../resources/abe.png"> bar|',
+ '</div>',
+ ].join('')),
+ 'Move forward sentence');
+
+test(() => assert_selection(
+ [
+ '<div contenteditable>',
+ 'foo <img src="../../resources/abe.png"> bar|',
+ '</div>',
+ ].join(''),
+ selection => selection.modify('move', 'backward', 'sentence'),
+ [
+ '<div contenteditable>',
+ '|foo <img src="../../resources/abe.png"> bar',
+ '</div>',
+ ].join('')),
+ 'Move backward sentence');
+
+test(() => assert_selection(
+ [
+ '<div contenteditable>',
+ '|foo<img src="../../resources/abe.png">bar',
+ '</div>',
+ ].join(''),
+ selection => selection.modify('move', 'forward', 'sentence'),
Xiaocheng 2016/10/26 09:31:04 Should be move forward by word twice.
yosin_UTC9 2016/10/26 09:40:39 No need to move twice to verify 'move-forward-sent
+ [
+ '<div contenteditable>',
+ 'foo<img src="../../resources/abe.png">bar|',
+ '</div>',
+ ].join('')),
+ 'Move forward word');
+
+test(() => assert_selection(
+ [
+ '<div contenteditable>',
+ 'foo<img src="../../resources/abe.png">bar|',
+ '</div>',
+ ].join(''),
+ selection => selection.modify('move', 'backward', 'sentence'),
Xiaocheng 2016/10/26 09:31:04 Should be move backward by word twice.
yosin_UTC9 2016/10/26 09:40:38 No need to move twice to verify 'move-backward-sen
+ [
+ '<div contenteditable>',
+ '|foo<img src="../../resources/abe.png">bar',
+ '</div>',
+ ].join('')),
+ 'Move backward word');
+</script>

Powered by Google App Engine
This is Rietveld 408576698