| 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 #ifndef CHROME_RENDERER_SPELLCHECKER_SPELLCHECK_PROVIDER_TEST_H_ | 5 #ifndef CHROME_RENDERER_SPELLCHECKER_SPELLCHECK_PROVIDER_TEST_H_ |
| 6 #define CHROME_RENDERER_SPELLCHECKER_SPELLCHECK_PROVIDER_TEST_H_ | 6 #define CHROME_RENDERER_SPELLCHECKER_SPELLCHECK_PROVIDER_TEST_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 class TestingSpellCheckProvider : public SpellCheckProvider { | 39 class TestingSpellCheckProvider : public SpellCheckProvider { |
| 40 public: | 40 public: |
| 41 TestingSpellCheckProvider(); | 41 TestingSpellCheckProvider(); |
| 42 // Takes ownership of |spellcheck|. | 42 // Takes ownership of |spellcheck|. |
| 43 explicit TestingSpellCheckProvider(SpellCheck* spellcheck); | 43 explicit TestingSpellCheckProvider(SpellCheck* spellcheck); |
| 44 | 44 |
| 45 ~TestingSpellCheckProvider() override; | 45 ~TestingSpellCheckProvider() override; |
| 46 bool Send(IPC::Message* message) override; | 46 bool Send(IPC::Message* message) override; |
| 47 void OnCallSpellingService(int route_id, | 47 void OnCallSpellingService(int route_id, |
| 48 int identifier, | 48 int identifier, |
| 49 const base::string16& text, | 49 const base::string16& text); |
| 50 const std::vector<SpellCheckMarker>& markers); | |
| 51 void ResetResult(); | 50 void ResetResult(); |
| 52 | 51 |
| 53 base::string16 text_; | 52 base::string16 text_; |
| 54 ScopedVector<IPC::Message> messages_; | 53 ScopedVector<IPC::Message> messages_; |
| 55 size_t spelling_service_call_count_; | 54 size_t spelling_service_call_count_; |
| 56 }; | 55 }; |
| 57 | 56 |
| 58 // SpellCheckProvider test fixture. | 57 // SpellCheckProvider test fixture. |
| 59 class SpellCheckProviderTest : public testing::Test { | 58 class SpellCheckProviderTest : public testing::Test { |
| 60 public: | 59 public: |
| 61 SpellCheckProviderTest(); | 60 SpellCheckProviderTest(); |
| 62 ~SpellCheckProviderTest() override; | 61 ~SpellCheckProviderTest() override; |
| 63 | 62 |
| 64 protected: | 63 protected: |
| 65 TestingSpellCheckProvider provider_; | 64 TestingSpellCheckProvider provider_; |
| 66 }; | 65 }; |
| 67 | 66 |
| 68 #endif // CHROME_RENDERER_SPELLCHECKER_SPELLCHECK_PROVIDER_TEST_H_ | 67 #endif // CHROME_RENDERER_SPELLCHECKER_SPELLCHECK_PROVIDER_TEST_H_ |
| OLD | NEW |