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 23b5cd8fc475815f40b600fec17ecf73e639e5ff..3a637e25bdd79f37259b03af90c8016ecd0183ce 100644 |
| --- a/third_party/WebKit/LayoutTests/editing/spelling/spellcheck_test.html |
| +++ b/third_party/WebKit/LayoutTests/editing/spelling/spellcheck_test.html |
| @@ -44,5 +44,24 @@ spellcheck_test( |
| '<input type="text" value="_asd_.">', |
| 'Mark misspellings in <input>.'); |
| +spellcheck_test( |
| + '<div contenteditable spellcheck="false">zz.|</div>', |
| + '', |
| + '<div contenteditable spellcheck="false">zz.</div>', |
| + { |
| + title: 'No marker on misspelled word when spellcheck=false.', |
| + callback: sample => spellcheck_test( |
| + sample, |
| + document => { |
| + var div = document.querySelector('div'); |
|
yosin_UTC9
2016/10/26 07:50:20
nit: s/var/const/
Xiaocheng
2016/10/26 08:01:17
Done.
|
| + div.setAttribute('spellcheck', 'true'); |
| + // Trigger spellchecker by selection change. |
| + document.getSelection().collapse(div, 0); |
| + }, |
| + '<div contenteditable spellcheck="true">_zz_.</div>', |
| + 'Marker appears after setting spellcheck=true.' |
| + ) |
| + }); |
| + |
| // TODO(xiaochengh): Design interface for checking marker description. |
| </script> |