Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/editing/spelling/spellcheck_test.html |
| diff --git a/third_party/WebKit/LayoutTests/editing/spelling/spellcheck_test.html b/third_party/WebKit/LayoutTests/editing/spelling/spellcheck_test.html |
| index a6c4921b34c786e9155b6d2e740090aa2c1ad758..994961979e50f7bdda9d0fd0dda7c7d6365f2f9b 100644 |
| --- a/third_party/WebKit/LayoutTests/editing/spelling/spellcheck_test.html |
| +++ b/third_party/WebKit/LayoutTests/editing/spelling/spellcheck_test.html |
| @@ -7,29 +7,42 @@ |
| <script> |
| // This file tests the functionality of spellcheck_test.js |
| -test( |
| - () => spellingMarker(0, 1, 'description').assertValid(), |
| - 'spellingMarker returns valid Marker.'); |
| +spellcheck_test( |
| + '<div contenteditable>|</div>', |
| + 'insertText zz.', |
| + '<div contenteditable>__.</div>', |
|
yosin_UTC9
2016/10/25 09:41:10
How about having expected selection?
spellcheck_t
Xiaocheng
2016/10/25 13:19:16
I don't think it makes too much sense to verify se
|
| + 'Mark misspellings after typing.'); |
| -test( |
| - () => grammarMarker(0, 1, 'description').assertValid(), |
| - 'grammarMarker returns valid Marker.'); |
| +spellcheck_test( |
| + '<div contenteditable>|</div>', |
| + 'insertText You has the right.', |
| + '<div contenteditable>You ~~~ the right.</div>', |
| + 'Mark ungrammatical phrases after typing.'); |
| spellcheck_test( |
| - '<div contentEditable>|</div>', |
| - 'insertText wellcome.', |
| - spellingMarker(0, 8, 'welcome'), // 'wellcome' |
| - 'Mark misspellings and give replacement suggestions after typing.'); |
| + '<div contenteditable>|</div>', |
| + 'insertText orange,zz,apple.', |
| + // Grammar marker under the whole sentence, and spelling marker under 'zz'. |
| + '<div contenteditable>~~~~~~~##~~~~~~~</div>', |
| + 'Mark overlapping grammer and spelling errors.'); |
| +// TODO(editing-dev): Make initial selection work for TEXTAREA. |
| spellcheck_test( |
| - '<div contentEditable>|</div>', |
| - 'insertText zz zz.', |
| - [spellingMarker(0, 2), spellingMarker(3, 2)], // Both 'zz's |
| - 'Mark multiple misspellings after typing.'); |
| + '<textarea>|</textarea>', |
| + document => { |
| + document.querySelector('textarea').focus(); |
| + document.execCommand('insertText', false, 'zz.'); |
| + }, |
| + '<textarea>__.</textarea>', |
| + 'Mark misspellings in <textarea>.'); |
| +// TODO(editing-dev): Make initial selection work for INPUT. |
| spellcheck_test( |
| - '<div contentEditable>|</div>', |
| - 'insertText You has the right.', |
| - grammarMarker(4, 3), // 'has' |
| - 'Mark ungrammatical phrases after typing.'); |
| + '<input type="text">|', |
| + document => { |
| + document.querySelector('input').focus(); |
| + document.execCommand('insertText', false, 'asd.'); |
| + }, |
| + '<input type="text" value="___.">', |
| + 'Mark misspellings in <input>.'); |
| </script> |