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

Unified Diff: chrome/browser/spellchecker/spellchecker_mac_unittest.cc

Issue 8890022: Remove Hunspell on OS X - step 2 (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rename unit tests Created 9 years 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: chrome/browser/spellchecker/spellchecker_mac_unittest.cc
diff --git a/chrome/browser/spellchecker/spellchecker_platform_engine_unittest.cc b/chrome/browser/spellchecker/spellchecker_mac_unittest.cc
similarity index 93%
rename from chrome/browser/spellchecker/spellchecker_platform_engine_unittest.cc
rename to chrome/browser/spellchecker/spellchecker_mac_unittest.cc
index 42e29cececdad52430ac353e7366cd6af75d4474..d60359b43441c2f5c4c499e2376ddeb2fd3beb6f 100644
--- a/chrome/browser/spellchecker/spellchecker_platform_engine_unittest.cc
+++ b/chrome/browser/spellchecker/spellchecker_mac_unittest.cc
@@ -4,14 +4,14 @@
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
-#include "chrome/browser/spellchecker/spellchecker_platform_engine.h"
+#include "chrome/browser/spellchecker/spellchecker_mac.h"
#include "testing/gtest/include/gtest/gtest.h"
// Tests that words are properly ignored. Currently only enabled on OS X as it
// is the only platform to support ignoring words. Note that in this test, we
// supply a non-zero doc_tag, in order to test that ignored words are matched to
// the correct document.
-TEST(PlatformSpellCheckTest, IgnoreWords_EN_US) {
+TEST(SpellCheckerMacTest, IgnoreWords_EN_US) {
const char* kTestCases[] = {
"teh",
"morblier",
@@ -21,27 +21,27 @@ TEST(PlatformSpellCheckTest, IgnoreWords_EN_US) {
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kTestCases); ++i) {
const string16 word(ASCIIToUTF16(kTestCases[i]));
- const int doc_tag = SpellCheckerPlatform::GetDocumentTag();
+ const int doc_tag = SpellCheckerMac::GetDocumentTag();
// The word should show up as misspelled.
- EXPECT_FALSE(SpellCheckerPlatform::CheckSpelling(word, doc_tag)) << word;
+ EXPECT_FALSE(SpellCheckerMac::CheckSpelling(word, doc_tag)) << word;
// Ignore the word.
- SpellCheckerPlatform::IgnoreWord(word);
+ SpellCheckerMac::IgnoreWord(word);
// The word should now show up as correctly spelled.
- EXPECT_TRUE(SpellCheckerPlatform::CheckSpelling(word, doc_tag)) << word;
+ EXPECT_TRUE(SpellCheckerMac::CheckSpelling(word, doc_tag)) << word;
// Close the docuemnt. Any words that we had previously ignored should no
// longer be ignored and thus should show up as misspelled.
- SpellCheckerPlatform::CloseDocumentWithTag(doc_tag);
+ SpellCheckerMac::CloseDocumentWithTag(doc_tag);
// The word should now show be spelled wrong again
- EXPECT_FALSE(SpellCheckerPlatform::CheckSpelling(word, doc_tag)) << word;
+ EXPECT_FALSE(SpellCheckerMac::CheckSpelling(word, doc_tag)) << word;
}
} // Test IgnoreWords_EN_US
-TEST(PlatformSpellCheckTest, SpellCheckSuggestions_EN_US) {
+TEST(SpellCheckerMacTest, SpellCheckSuggestions_EN_US) {
static const struct {
const char* input; // A string to be tested.
const char* suggested_word; // A suggested word that should occur.
@@ -316,11 +316,11 @@ TEST(PlatformSpellCheckTest, SpellCheckSuggestions_EN_US) {
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kTestCases); ++i) {
const string16 word(ASCIIToUTF16(kTestCases[i].input));
- EXPECT_FALSE(SpellCheckerPlatform::CheckSpelling(word, 0)) << word;
+ EXPECT_FALSE(SpellCheckerMac::CheckSpelling(word, 0)) << word;
// Check if the suggested words occur.
std::vector<string16> suggestions;
- SpellCheckerPlatform::FillSuggestionList(word, &suggestions);
+ SpellCheckerMac::FillSuggestionList(word, &suggestions);
bool suggested_word_is_present = false;
const string16 suggested_word(ASCIIToUTF16(kTestCases[i].suggested_word));
for (size_t j = 0; j < suggestions.size(); j++) {

Powered by Google App Engine
This is Rietveld 408576698