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

Unified Diff: third_party/WebKit/LayoutTests/editing/selection/modify_extend/extend_by_word_002.html

Issue 2535173009: Convert editing/selection/extend-by-word-002.html with assert_selection (Closed)
Patch Set: Add platform-dependent test results 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
« no previous file with comments | « third_party/WebKit/LayoutTests/editing/selection/extend-by-word-002-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/editing/selection/modify_extend/extend_by_word_002.html
diff --git a/third_party/WebKit/LayoutTests/editing/selection/modify_extend/extend_by_word_002.html b/third_party/WebKit/LayoutTests/editing/selection/modify_extend/extend_by_word_002.html
new file mode 100644
index 0000000000000000000000000000000000000000..73c6e28b4f75cb5869ef6fc2e7f3d237d7ee3a1a
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/editing/selection/modify_extend/extend_by_word_002.html
@@ -0,0 +1,40 @@
+<!doctype html>
+<script src="../../../resources/testharness.js"></script>
+<script src="../../../resources/testharnessreport.js"></script>
+<script src="../../assert_selection.js"></script>
+
+<script>
+const middot = String.fromCharCode(183); // &middot;
+const isMac = navigator.platform.indexOf('Mac') !== -1;
+
+// The current behavior is wrong. The correct focus should be at 'Steak |& ...'
+// on Windows, and 'Steak| & ....' on other platforms.
+test(() => assert_selection(
+ [
+ '<style>ul li:first-letter {color: red;}</style>',
+ '<ul>',
+ `<li>${middot} <a href="foo.html">|Appetizers</a></li>`,
+ `<li>${middot} <a href="foo.html">Soups & Salads</a></li>`,
+ `<li>${middot} <a href="foo.html">Sandwiches & Burgers</a></li>`,
+ `<li>${middot} <a href="foo.html">Steak & Ribs</a></li>`,
+ `<li>${middot} <a href="foo.html">Seafood</a></li>`,
+ `<li>${middot} <a href="foo.html">Combos</a></li>`,
+ '</ul>'
+ ].join(''),
+ selection => {
+ for (let i = 0; i < 6; ++i)
+ selection.modify('extend', 'forward', 'word');
+ },
+ [
+ '<style>ul li:first-letter {color: red;}</style>',
+ '<ul>',
+ `<li>${middot} <a href="foo.html">^Appetizers</a></li>`,
+ `<li>${middot} <a href="foo.html">Soups & Salads</a></li>`,
+ `<li>${middot} <a href="foo.html">Sandwiches & Burgers</a></li>`,
+ isMac ? `<li>${middot} <a href="foo.html">Stea|k & Ribs</a></li>`
+ : `<li>${middot} <a href="foo.html">Steak &| Ribs</a></li>`,
+ `<li>${middot} <a href="foo.html">Seafood</a></li>`,
+ `<li>${middot} <a href="foo.html">Combos</a></li>`,
+ '</ul>'
+ ].join('')), 'Extend by word in lines with :first-letter');
+</script>
« no previous file with comments | « third_party/WebKit/LayoutTests/editing/selection/extend-by-word-002-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698