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

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

Issue 2184473006: Convert editing/selection/5234383-[12].html to use w3c test harness (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2016-07-27T13:42:56 Created 4 years, 5 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_by_sentence_boundary.html
diff --git a/third_party/WebKit/LayoutTests/editing/selection/modify_move/move_by_sentence_boundary.html b/third_party/WebKit/LayoutTests/editing/selection/modify_move/move_by_sentence_boundary.html
new file mode 100644
index 0000000000000000000000000000000000000000..868053016c9f7e7e7f0c2a63594ca879b01574b1
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/editing/selection/modify_move/move_by_sentence_boundary.html
@@ -0,0 +1,101 @@
+<!doctype html>
+<script src="../../../resources/testharness.js"></script>
+<script src="../../../resources/testharnessreport.js"></script>
+<script src="../../assert_selection.js"></script>
+<script>
+test(() => assert_selection(
+ [
+ 'This is a sent|ence number one.',
+ 'This is a sentence number two.',
+ ].join(' '),
+ selection => selection.modify('move', 'forward', 'sentenceBoundary'),
+ [
+ 'This is a sentence number one.',
+ '|This is a sentence number two.',
+ ].join(' ')),
+ 'move forward sentence boundary from middle of sentence');
+
+test(() => assert_selection(
+ [
+ '|This is a sentence number one.',
+ 'This is a sentence number two.',
+ ].join(' '),
+ selection => selection.modify('move', 'forward', 'sentenceBoundary'),
+ [
+ 'This is a sentence number one.',
+ '|This is a sentence number two.',
+ ].join(' ')),
+ 'move forward sentence boundary from start of sentence');
+
+test(() => assert_selection(
+ [
+ 'This is a sentence number one.|',
+ 'This is a sentence number two.',
+ ].join(' '),
+ selection => selection.modify('move', 'forward', 'sentenceBoundary'),
+ [
+ 'This is a sentence number one.',
+ 'This is a sentence number two.|',
+ ].join(' ')),
+ 'move forward sentence boundary from end of sentence');
+
+test(() => assert_selection(
+ [
+ 'This is a sentence number one. | ',
+ 'This is a sentence number two.',
+ ].join(' '),
+ selection => selection.modify('move', 'forward', 'sentenceBoundary'),
+ [
+ 'This is a sentence number one. ',
+ 'This is a sentence number two.|',
+ ].join(' ')),
+ 'move forward sentence boundary from space');
+
+test(() => assert_selection(
+ [
+ 'This is a sent|ence number one.',
+ 'This is a sentence number two.',
+ ].join(' '),
+ selection => selection.modify('move', 'backward', 'sentenceBoundary'),
+ [
+ '|This is a sentence number one.',
+ 'This is a sentence number two.',
+ ].join(' ')),
+ 'move backward sentence boundary from middle of sentence');
+
+test(() => assert_selection(
+ [
+ 'This is a sentence number one.',
+ '|This is a sentence number two.',
+ ].join(' '),
+ selection => selection.modify('move', 'backward', 'sentenceBoundary'),
+ [
+ '|This is a sentence number one.',
+ 'This is a sentence number two.',
+ ].join(' ')),
+ 'move backward sentence boundary from start of sentence');
+
+test(() => assert_selection(
+ [
+ 'This is a sentence number one.',
+ 'This is a sentence number two.|',
+ ].join(' '),
+ selection => selection.modify('move', 'backward', 'sentenceBoundary'),
+ [
+ 'This is a sentence number one.',
+ '|This is a sentence number two.',
+ ].join(' ')),
+ 'move backward sentence boundary from end of sentence');
+
+test(() => assert_selection(
+ [
+ 'This is a sentence number one. | ',
+ 'This is a sentence number two.',
+ ].join(' '),
+ selection => selection.modify('move', 'backward', 'sentenceBoundary'),
+ [
+ '|This is a sentence number one. ',
+ 'This is a sentence number two.',
+ ].join(' ')),
+ 'move backward sentence boundary from space');
+</script>

Powered by Google App Engine
This is Rietveld 408576698