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

Unified Diff: third_party/WebKit/LayoutTests/editing/selection/modify_move/move-by-paragraph.html

Issue 2525273002: [Editing][CodeHealth] Convert editing/selection to utilize w3c test harness part 1. (Closed)
Patch Set: update Created 4 years 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-by-paragraph.html
diff --git a/third_party/WebKit/LayoutTests/editing/selection/modify_move/move-by-paragraph.html b/third_party/WebKit/LayoutTests/editing/selection/modify_move/move-by-paragraph.html
new file mode 100644
index 0000000000000000000000000000000000000000..5ba2ff87e07deca5d6ca99c9699bf9e33073a5e5
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/editing/selection/modify_move/move-by-paragraph.html
@@ -0,0 +1,26 @@
+<!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>foo<div>bar|</div>baz</div>',
+ selection => selection.modify('move', 'backward', 'paragraph'),
+ '<div>foo|<div>bar</div>baz</div>');
+ assert_selection(
+ '<div>foo<span>bar|</span>baz</div>',
+ selection => selection.modify('move', 'backward', 'paragraph'),
+ '<div>|foo<span>bar</span>baz</div>');
+
yosin_UTC9 2017/01/11 05:59:54 Could you have two |test()| rather than adding bla
yoichio 2017/01/11 07:18:57 Done.
+ assert_selection(
+ '<div>foo<div>|bar</div>baz</div>',
+ selection => selection.modify('move', 'forward', 'paragraph'),
+ '<div>foo<div>bar</div>|baz</div>');
+ assert_selection(
+ '<div>foo<span>|bar</span>baz</div>',
+ selection => selection.modify('move', 'forward', 'paragraph'),
+ '<div>foo<span>bar</span>baz|</div>');
+
yosin_UTC9 2017/01/11 05:59:54 nit: no need to have an extra blank line.
yoichio 2017/01/11 07:18:57 Done.
+}, 'Selection.modify move by paragraph');
+</script>

Powered by Google App Engine
This is Rietveld 408576698