| 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 "components/spellcheck/renderer/spellcheck.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <utility> | 10 #include <utility> |
| 11 | 11 |
| 12 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
| 13 #include "base/files/file_util.h" | 13 #include "base/files/file_util.h" |
| 14 #include "base/macros.h" | 14 #include "base/macros.h" |
| 15 #include "base/message_loop/message_loop.h" | 15 #include "base/message_loop/message_loop.h" |
| 16 #include "base/path_service.h" | 16 #include "base/path_service.h" |
| 17 #include "base/run_loop.h" | 17 #include "base/run_loop.h" |
| 18 #include "base/strings/string_number_conversions.h" | 18 #include "base/strings/string_number_conversions.h" |
| 19 #include "base/strings/utf_string_conversions.h" | 19 #include "base/strings/utf_string_conversions.h" |
| 20 #include "build/build_config.h" | 20 #include "build/build_config.h" |
| 21 #include "chrome/common/spellcheck_common.h" | 21 #include "components/spellcheck/common/spellcheck_common.h" |
| 22 #include "chrome/common/spellcheck_result.h" | 22 #include "components/spellcheck/common/spellcheck_result.h" |
| 23 #include "chrome/renderer/spellchecker/hunspell_engine.h" | 23 #include "components/spellcheck/renderer/hunspell_engine.h" |
| 24 #include "chrome/renderer/spellchecker/spellcheck_language.h" | 24 #include "components/spellcheck/renderer/spellcheck_language.h" |
| 25 #include "testing/gtest/include/gtest/gtest.h" | 25 #include "testing/gtest/include/gtest/gtest.h" |
| 26 #include "third_party/WebKit/public/platform/WebVector.h" | 26 #include "third_party/WebKit/public/platform/WebVector.h" |
| 27 #include "third_party/WebKit/public/web/WebTextCheckingCompletion.h" | 27 #include "third_party/WebKit/public/web/WebTextCheckingCompletion.h" |
| 28 #include "third_party/WebKit/public/web/WebTextCheckingResult.h" | 28 #include "third_party/WebKit/public/web/WebTextCheckingResult.h" |
| 29 | 29 |
| 30 #define TYPOGRAPHICAL_APOSTROPHE L"\x2019" | 30 #define TYPOGRAPHICAL_APOSTROPHE L"\x2019" |
| 31 | 31 |
| 32 namespace { | 32 namespace { |
| 33 const int kNoOffset = 0; | 33 const int kNoOffset = 0; |
| 34 const int kNoTag = 0; | 34 const int kNoTag = 0; |
| (...skipping 1527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1562 // to be updated accordingly. | 1562 // to be updated accordingly. |
| 1563 ASSERT_EQ(5, chrome::spellcheck_common::kMaxSuggestions); | 1563 ASSERT_EQ(5, chrome::spellcheck_common::kMaxSuggestions); |
| 1564 FillSuggestions(suggestions_list, &suggestion_results); | 1564 FillSuggestions(suggestions_list, &suggestion_results); |
| 1565 ASSERT_EQ(5U, suggestion_results.size()); | 1565 ASSERT_EQ(5U, suggestion_results.size()); |
| 1566 EXPECT_EQ(base::ASCIIToUTF16("0foo"), suggestion_results[0]); | 1566 EXPECT_EQ(base::ASCIIToUTF16("0foo"), suggestion_results[0]); |
| 1567 EXPECT_EQ(base::ASCIIToUTF16("1foo"), suggestion_results[1]); | 1567 EXPECT_EQ(base::ASCIIToUTF16("1foo"), suggestion_results[1]); |
| 1568 EXPECT_EQ(base::ASCIIToUTF16("2foo"), suggestion_results[2]); | 1568 EXPECT_EQ(base::ASCIIToUTF16("2foo"), suggestion_results[2]); |
| 1569 EXPECT_EQ(base::ASCIIToUTF16("0bar"), suggestion_results[3]); | 1569 EXPECT_EQ(base::ASCIIToUTF16("0bar"), suggestion_results[3]); |
| 1570 EXPECT_EQ(base::ASCIIToUTF16("1bar"), suggestion_results[4]); | 1570 EXPECT_EQ(base::ASCIIToUTF16("1bar"), suggestion_results[4]); |
| 1571 } | 1571 } |
| OLD | NEW |