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

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

Issue 2734013002: Implement cold mode invocation for idle time spell checker (Closed)
Patch Set: rebased Mar 7 Created 3 years, 9 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/cold_mode_static_page.html
diff --git a/third_party/WebKit/LayoutTests/editing/spelling/cold_mode_static_page.html b/third_party/WebKit/LayoutTests/editing/spelling/cold_mode_static_page.html
new file mode 100644
index 0000000000000000000000000000000000000000..d6fd0044822a7d7eb7a1cc9e29e6187d075b1ce8
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/editing/spelling/cold_mode_static_page.html
@@ -0,0 +1,82 @@
+<!doctype html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../assert_selection.js"></script>
+<script src="spellcheck_test.js"></script>
+<script>
+spellcheck_test(
+ '<div contenteditable>zz</div>',
+ '',
+ '<div contenteditable>#zz#</div>',
+ {
+ title: 'Check static contenteditable.',
+ needsFullCheck: true
+ });
+
+spellcheck_test(
+ '<textarea>zz</textarea>',
+ '',
+ '<textarea>#zz#</textarea>',
+ {
+ title: 'Check static TEXTAREA.',
+ needsFullCheck: true
+ });
+
+// No test case for INPUT because unfocused INPUT should not be checked.
+
+spellcheck_test(
+ '<div contenteditable>zz</div><div contenteditable>asd</div>',
+ '',
+ '<div contenteditable>#zz#</div><div contenteditable>#asd#</div>',
+ {
+ title: 'Check multiple fields.',
+ needsFullCheck: true
+ });
+
+spellcheck_test(
+ [
+ '<div contenteditable spellcheck="false">',
+ 'zz',
+ '<div spellcheck="true">',
+ 'foo',
+ '<div spellcheck="false">asd</div>',
+ 'foo',
+ '</div>',
+ 'zz',
+ '</div>'
+ ].join(''),
+ '',
+ [
+ '<div contenteditable spellcheck="false">',
+ 'zz',
+ '<div spellcheck="true">',
+ '#foo#',
+ '<div spellcheck="false">asd</div>',
+ '#foo#',
+ '</div>',
+ 'zz',
+ '</div>'
+ ].join(''),
+ {
+ title: 'Handle mixed spellcheck values.',
+ needsFullCheck: true
+ });
+
+spellcheck_test(
+ '<textarea disabled>zz</textarea>',
+ '',
+ '<textarea disabled>zz</textarea>',
+ {
+ title: 'Do not check disabled TEXTAREA.',
+ needsFullCheck: true
+ });
+
+spellcheck_test(
+ '<textarea readonly>zz</textarea>',
+ '',
+ '<textarea readonly>zz</textarea>',
+ {
+ title: 'Do not check readonly TEXTAREA.',
+ needsFullCheck: true
+ });
+</script>

Powered by Google App Engine
This is Rietveld 408576698