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

Unified Diff: chrome/renderer/spellchecker/spellcheck_worditerator_unittest.cc

Issue 11413054: [Spellcheck] Don't initialize SpellcheckWordIterator with empty rulesets. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 | « chrome/renderer/spellchecker/spellcheck_worditerator.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/spellchecker/spellcheck_worditerator_unittest.cc
diff --git a/chrome/renderer/spellchecker/spellcheck_worditerator_unittest.cc b/chrome/renderer/spellchecker/spellcheck_worditerator_unittest.cc
index 1dc8614eb88aca01fab25025a99955be143d4399..f8d316adcdbea78f94bdb44dd73b632257d7569b 100644
--- a/chrome/renderer/spellchecker/spellcheck_worditerator_unittest.cc
+++ b/chrome/renderer/spellchecker/spellcheck_worditerator_unittest.cc
@@ -228,3 +228,22 @@ TEST(SpellcheckWordIteratorTest, TreatNumbersAsWordCharacters) {
EXPECT_NE(input_word, actual_word);
}
}
+
+TEST(SpellcheckWordIteratorTest, Initialization) {
+ // Test initialization works when a default language is set.
+ {
+ SpellcheckCharAttribute attributes;
+ attributes.SetDefaultLanguage("en-US");
+
+ SpellcheckWordIterator iterator;
+ EXPECT_TRUE(iterator.Initialize(&attributes, true));
+ }
+
+ // Test initialization fails when no default language is set.
+ {
+ SpellcheckCharAttribute attributes;
+
+ SpellcheckWordIterator iterator;
+ EXPECT_FALSE(iterator.Initialize(&attributes, true));
+ }
+}
« no previous file with comments | « chrome/renderer/spellchecker/spellcheck_worditerator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698