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

Side by Side Diff: chrome/browser/spellcheck_unittest.cc

Issue 176046: Update hunspell DEPS to 1.2.8 (Closed)
Patch Set: Update to newer DEPS Created 11 years, 3 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 unified diff | Download patch
« no previous file with comments | « DEPS ('k') | chrome/browser/spellchecker.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "chrome/browser/spellchecker.h" 10 #include "chrome/browser/spellchecker.h"
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 {L"wellfare", false, 0,0,L"welfare"}, 599 {L"wellfare", false, 0,0,L"welfare"},
600 {L"wilfull", false, 0,0,L"willful"}, 600 {L"wilfull", false, 0,0,L"willful"},
601 {L"withold", false, 0,0,L"withhold"}, 601 {L"withold", false, 0,0,L"withhold"},
602 {L"writting", false, 0,0,L"writing"}, 602 {L"writting", false, 0,0,L"writing"},
603 #else 603 #else
604 {L"ello", false, 0, 0, L"hello"}, 604 {L"ello", false, 0, 0, L"hello"},
605 {L"ello", false, 0, 0, L"cello"}, 605 {L"ello", false, 0, 0, L"cello"},
606 {L"wate", false, 0, 0, L"water"}, 606 {L"wate", false, 0, 0, L"water"},
607 {L"wate", false, 0, 0, L"waste"}, 607 {L"wate", false, 0, 0, L"waste"},
608 {L"wate", false, 0, 0, L"sate"}, 608 {L"wate", false, 0, 0, L"sate"},
609 {L"wate", false, 0, 0, L"rate"}, 609 {L"wate", false, 0, 0, L"ate"},
610 {L"jum", false, 0, 0, L"jump"}, 610 {L"jum", false, 0, 0, L"jump"},
611 {L"jum", false, 0, 0, L"rum"}, 611 {L"jum", false, 0, 0, L"hum"},
612 {L"jum", false, 0, 0, L"sum"}, 612 {L"jum", false, 0, 0, L"sum"},
613 {L"jum", false, 0, 0, L"tum"}, 613 {L"jum", false, 0, 0, L"um"},
614 #endif //!OS_MACOSX 614 #endif //!OS_MACOSX
615 // TODO (Sidchat): add many more examples. 615 // TODO (Sidchat): add many more examples.
616 }; 616 };
617 617
618 FilePath hunspell_directory = GetHunspellDirectory(); 618 FilePath hunspell_directory = GetHunspellDirectory();
619 ASSERT_FALSE(hunspell_directory.empty()); 619 ASSERT_FALSE(hunspell_directory.empty());
620 620
621 scoped_refptr<SpellChecker> spell_checker(new SpellChecker( 621 scoped_refptr<SpellChecker> spell_checker(new SpellChecker(
622 hunspell_directory, "en-US", NULL, FilePath())); 622 hunspell_directory, "en-US", NULL, FilePath()));
623 623
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
1080 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kTestCases); ++i) { 1080 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kTestCases); ++i) {
1081 std::wstring misspelled_word(kTestCases[i].input); 1081 std::wstring misspelled_word(kTestCases[i].input);
1082 std::wstring expected_autocorrect_word(kTestCases[i].expected_result); 1082 std::wstring expected_autocorrect_word(kTestCases[i].expected_result);
1083 std::wstring autocorrect_word; 1083 std::wstring autocorrect_word;
1084 spell_checker->GetAutoCorrectionWord(misspelled_word, &autocorrect_word); 1084 spell_checker->GetAutoCorrectionWord(misspelled_word, &autocorrect_word);
1085 1085
1086 // Check for spelling. 1086 // Check for spelling.
1087 EXPECT_EQ(expected_autocorrect_word, autocorrect_word); 1087 EXPECT_EQ(expected_autocorrect_word, autocorrect_word);
1088 } 1088 }
1089 } 1089 }
OLDNEW
« no previous file with comments | « DEPS ('k') | chrome/browser/spellchecker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698