OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/renderer/spellchecker/spellcheck.h" | 5 #include "chrome/renderer/spellchecker/spellcheck.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 |
7 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
8 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
| 11 #include "base/macros.h" |
9 #include "base/message_loop/message_loop.h" | 12 #include "base/message_loop/message_loop.h" |
10 #include "base/path_service.h" | 13 #include "base/path_service.h" |
11 #include "base/strings/string_number_conversions.h" | 14 #include "base/strings/string_number_conversions.h" |
12 #include "base/strings/utf_string_conversions.h" | 15 #include "base/strings/utf_string_conversions.h" |
| 16 #include "build/build_config.h" |
13 #include "chrome/common/spellcheck_common.h" | 17 #include "chrome/common/spellcheck_common.h" |
14 #include "chrome/common/spellcheck_result.h" | 18 #include "chrome/common/spellcheck_result.h" |
15 #include "chrome/renderer/spellchecker/hunspell_engine.h" | 19 #include "chrome/renderer/spellchecker/hunspell_engine.h" |
16 #include "chrome/renderer/spellchecker/spellcheck_language.h" | 20 #include "chrome/renderer/spellchecker/spellcheck_language.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
18 #include "third_party/WebKit/public/platform/WebVector.h" | 22 #include "third_party/WebKit/public/platform/WebVector.h" |
19 #include "third_party/WebKit/public/web/WebTextCheckingCompletion.h" | 23 #include "third_party/WebKit/public/web/WebTextCheckingCompletion.h" |
20 #include "third_party/WebKit/public/web/WebTextCheckingResult.h" | 24 #include "third_party/WebKit/public/web/WebTextCheckingResult.h" |
21 | 25 |
22 #define TYPOGRAPHICAL_APOSTROPHE L"\x2019" | 26 #define TYPOGRAPHICAL_APOSTROPHE L"\x2019" |
(...skipping 1522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1545 // to be updated accordingly. | 1549 // to be updated accordingly. |
1546 ASSERT_EQ(5, chrome::spellcheck_common::kMaxSuggestions); | 1550 ASSERT_EQ(5, chrome::spellcheck_common::kMaxSuggestions); |
1547 FillSuggestions(suggestions_list, &suggestion_results); | 1551 FillSuggestions(suggestions_list, &suggestion_results); |
1548 ASSERT_EQ(5U, suggestion_results.size()); | 1552 ASSERT_EQ(5U, suggestion_results.size()); |
1549 EXPECT_EQ(base::ASCIIToUTF16("0foo"), suggestion_results[0]); | 1553 EXPECT_EQ(base::ASCIIToUTF16("0foo"), suggestion_results[0]); |
1550 EXPECT_EQ(base::ASCIIToUTF16("1foo"), suggestion_results[1]); | 1554 EXPECT_EQ(base::ASCIIToUTF16("1foo"), suggestion_results[1]); |
1551 EXPECT_EQ(base::ASCIIToUTF16("2foo"), suggestion_results[2]); | 1555 EXPECT_EQ(base::ASCIIToUTF16("2foo"), suggestion_results[2]); |
1552 EXPECT_EQ(base::ASCIIToUTF16("0bar"), suggestion_results[3]); | 1556 EXPECT_EQ(base::ASCIIToUTF16("0bar"), suggestion_results[3]); |
1553 EXPECT_EQ(base::ASCIIToUTF16("1bar"), suggestion_results[4]); | 1557 EXPECT_EQ(base::ASCIIToUTF16("1bar"), suggestion_results[4]); |
1554 } | 1558 } |
OLD | NEW |