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

Unified Diff: third_party/WebKit/LayoutTests/editing/spelling/spellcheck_test.html

Issue 2445323005: Allow spellcheck_test to run custom callback at completion (Closed)
Patch Set: Change documentation accordingly Created 4 years, 2 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/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>

Powered by Google App Engine
This is Rietveld 408576698