| 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); // ·
|
| +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>
|
|
|