| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCKSPELLCHECK_H_ | 5 #ifndef CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCKSPELLCHECK_H_ |
| 6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCKSPELLCHECK_H_ | 6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCKSPELLCHECK_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "third_party/WebKit/public/platform/WebString.h" | 11 #include "third_party/WebKit/public/platform/WebString.h" |
| 12 #include "third_party/WebKit/public/platform/WebVector.h" | 12 #include "third_party/WebKit/public/platform/WebVector.h" |
| 13 #include "third_party/WebKit/public/web/WebTextCheckingResult.h" | 13 #include "third_party/WebKit/public/web/WebTextCheckingResult.h" |
| 14 | 14 |
| 15 namespace WebTestRunner { | 15 namespace content { |
| 16 | 16 |
| 17 // A mock implementation of a spell-checker used for WebKit tests. | 17 // A mock implementation of a spell-checker used for WebKit tests. |
| 18 // This class only implements the minimal functionarities required by WebKit | 18 // This class only implements the minimal functionarities required by WebKit |
| 19 // tests, i.e. this class just compares the given string with known misspelled | 19 // tests, i.e. this class just compares the given string with known misspelled |
| 20 // words in webkit tests and mark them as missspelled. | 20 // words in webkit tests and mark them as missspelled. |
| 21 // Even though this is sufficent for webkit tests, this class is not suitable | 21 // Even though this is sufficent for webkit tests, this class is not suitable |
| 22 // for any other usages. | 22 // for any other usages. |
| 23 class MockSpellCheck { | 23 class MockSpellCheck { |
| 24 public: | 24 public: |
| 25 static void fillSuggestionList(const blink::WebString& word, blink::WebVecto
r<blink::WebString>* suggestions); | 25 static void fillSuggestionList(const blink::WebString& word, blink::WebVecto
r<blink::WebString>* suggestions); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 | 57 |
| 58 // A table that consists of misspelled words. | 58 // A table that consists of misspelled words. |
| 59 std::vector<base::string16> m_misspelledWords; | 59 std::vector<base::string16> m_misspelledWords; |
| 60 | 60 |
| 61 // A flag representing whether or not this object is initialized. | 61 // A flag representing whether or not this object is initialized. |
| 62 bool m_initialized; | 62 bool m_initialized; |
| 63 | 63 |
| 64 DISALLOW_COPY_AND_ASSIGN(MockSpellCheck); | 64 DISALLOW_COPY_AND_ASSIGN(MockSpellCheck); |
| 65 }; | 65 }; |
| 66 | 66 |
| 67 } | 67 } // namespace content |
| 68 | 68 |
| 69 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCKSPELLCHECK_H_ | 69 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCKSPELLCHECK_H_ |
| OLD | NEW |