| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "webkit/glue/webkit_glue.h" | 5 #include "webkit/glue/webkit_glue.h" |
| 6 | 6 |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "base/platform_file.h" | 10 #include "base/platform_file.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 // in this file. | 21 // in this file. |
| 22 extern void InitHunspellWithFiles(FILE* file_aff_hunspell, | 22 extern void InitHunspellWithFiles(FILE* file_aff_hunspell, |
| 23 FILE* file_dic_hunspell); | 23 FILE* file_dic_hunspell); |
| 24 | 24 |
| 25 FilePath GetHunspellDirectory() { | 25 FilePath GetHunspellDirectory() { |
| 26 FilePath hunspell_directory; | 26 FilePath hunspell_directory; |
| 27 if (!PathService::Get(base::DIR_SOURCE_ROOT, &hunspell_directory)) | 27 if (!PathService::Get(base::DIR_SOURCE_ROOT, &hunspell_directory)) |
| 28 return FilePath(); | 28 return FilePath(); |
| 29 | 29 |
| 30 hunspell_directory = hunspell_directory.AppendASCII("third_party"); | 30 hunspell_directory = hunspell_directory.AppendASCII("third_party"); |
| 31 hunspell_directory = hunspell_directory.AppendASCII("hunspell"); | 31 hunspell_directory = hunspell_directory.AppendASCII("hunspell_dictionaries"); |
| 32 hunspell_directory = hunspell_directory.AppendASCII("dictionaries"); | |
| 33 return hunspell_directory; | 32 return hunspell_directory; |
| 34 } | 33 } |
| 35 | 34 |
| 36 class SpellCheckTest : public testing::Test { | 35 class SpellCheckTest : public testing::Test { |
| 37 public: | 36 public: |
| 38 SpellCheckTest() { | 37 SpellCheckTest() { |
| 39 ReinitializeSpellCheck("en-US"); | 38 ReinitializeSpellCheck("en-US"); |
| 40 } | 39 } |
| 41 | 40 |
| 42 void ReinitializeSpellCheck(const std::string& language) { | 41 void ReinitializeSpellCheck(const std::string& language) { |
| (...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 668 UTF8ToUTF16(kTestCases[i].expected_result)); | 667 UTF8ToUTF16(kTestCases[i].expected_result)); |
| 669 string16 autocorrect_word = spell_check()->GetAutoCorrectionWord( | 668 string16 autocorrect_word = spell_check()->GetAutoCorrectionWord( |
| 670 misspelled_word, 0); | 669 misspelled_word, 0); |
| 671 | 670 |
| 672 // Check for spelling. | 671 // Check for spelling. |
| 673 EXPECT_EQ(expected_autocorrect_word, autocorrect_word); | 672 EXPECT_EQ(expected_autocorrect_word, autocorrect_word); |
| 674 } | 673 } |
| 675 } | 674 } |
| 676 | 675 |
| 677 } // namespace | 676 } // namespace |
| OLD | NEW |