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

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

Issue 2435273002: Introduce spellcheck_test (Closed)
Patch Set: Mon Oct 24 17:28:00 JST 2016 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/editing/spelling/spellcheck_test.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
new file mode 100644
index 0000000000000000000000000000000000000000..a6c4921b34c786e9155b6d2e740090aa2c1ad758
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/editing/spelling/spellcheck_test.html
@@ -0,0 +1,35 @@
+<!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>
+// This file tests the functionality of spellcheck_test.js
+
+test(
+ () => spellingMarker(0, 1, 'description').assertValid(),
+ 'spellingMarker returns valid Marker.');
+
+test(
+ () => grammarMarker(0, 1, 'description').assertValid(),
+ 'grammarMarker returns valid Marker.');
+
+spellcheck_test(
+ '<div contentEditable>|</div>',
+ 'insertText wellcome.',
+ spellingMarker(0, 8, 'welcome'), // 'wellcome'
+ 'Mark misspellings and give replacement suggestions after typing.');
+
+spellcheck_test(
+ '<div contentEditable>|</div>',
+ 'insertText zz zz.',
+ [spellingMarker(0, 2), spellingMarker(3, 2)], // Both 'zz's
+ 'Mark multiple misspellings after typing.');
+
+spellcheck_test(
+ '<div contentEditable>|</div>',
+ 'insertText You has the right.',
+ grammarMarker(4, 3), // 'has'
+ 'Mark ungrammatical phrases after typing.');
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/editing/spelling/spellcheck_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698