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 645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
656 | 656 |
657 int misspelling_start = 0; | 657 int misspelling_start = 0; |
658 int misspelling_length = 0; | 658 int misspelling_length = 0; |
659 bool result = spell_check()->SpellCheckWord( | 659 bool result = spell_check()->SpellCheckWord( |
660 WideToUTF16(kTestCases[i].input).c_str(), | 660 WideToUTF16(kTestCases[i].input).c_str(), |
661 static_cast<int>(input_length), | 661 static_cast<int>(input_length), |
662 0, | 662 0, |
663 &misspelling_start, | 663 &misspelling_start, |
664 &misspelling_length, NULL); | 664 &misspelling_length, NULL); |
665 | 665 |
666 EXPECT_EQ(true, result) << kTestCases[i].language; | 666 EXPECT_TRUE(result) << kTestCases[i].language; |
667 EXPECT_EQ(0, misspelling_start); | 667 EXPECT_EQ(0, misspelling_start); |
668 EXPECT_EQ(0, misspelling_length); | 668 EXPECT_EQ(0, misspelling_length); |
669 } | 669 } |
670 } | 670 } |
671 | 671 |
672 TEST_F(SpellCheckTest, GetAutoCorrectionWord_EN_US) { | 672 TEST_F(SpellCheckTest, GetAutoCorrectionWord_EN_US) { |
673 static const struct { | 673 static const struct { |
674 // A misspelled word. | 674 // A misspelled word. |
675 const char* input; | 675 const char* input; |
676 | 676 |
(...skipping 15 matching lines...) Expand all Loading... |
692 UTF8ToUTF16(kTestCases[i].expected_result)); | 692 UTF8ToUTF16(kTestCases[i].expected_result)); |
693 string16 autocorrect_word = spell_check()->GetAutoCorrectionWord( | 693 string16 autocorrect_word = spell_check()->GetAutoCorrectionWord( |
694 misspelled_word, 0); | 694 misspelled_word, 0); |
695 | 695 |
696 // Check for spelling. | 696 // Check for spelling. |
697 EXPECT_EQ(expected_autocorrect_word, autocorrect_word); | 697 EXPECT_EQ(expected_autocorrect_word, autocorrect_word); |
698 } | 698 } |
699 } | 699 } |
700 | 700 |
701 } // namespace | 701 } // namespace |
OLD | NEW |