| 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 COMPONENTS_SPELLCHECK_RENDERER_SPELLCHECK_PROVIDER_TEST_H_ | 5 #ifndef COMPONENTS_SPELLCHECK_RENDERER_SPELLCHECK_PROVIDER_TEST_H_ |
| 6 #define COMPONENTS_SPELLCHECK_RENDERER_SPELLCHECK_PROVIDER_TEST_H_ | 6 #define COMPONENTS_SPELLCHECK_RENDERER_SPELLCHECK_PROVIDER_TEST_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/memory/scoped_vector.h" |
| 12 #include "base/strings/string16.h" | 13 #include "base/strings/string16.h" |
| 13 #include "components/spellcheck/renderer/spellcheck_provider.h" | 14 #include "components/spellcheck/renderer/spellcheck_provider.h" |
| 14 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
| 15 #include "third_party/WebKit/public/platform/WebVector.h" | 16 #include "third_party/WebKit/public/platform/WebVector.h" |
| 16 #include "third_party/WebKit/public/web/WebTextCheckingCompletion.h" | 17 #include "third_party/WebKit/public/web/WebTextCheckingCompletion.h" |
| 17 #include "third_party/WebKit/public/web/WebTextCheckingResult.h" | 18 #include "third_party/WebKit/public/web/WebTextCheckingResult.h" |
| 18 | 19 |
| 19 namespace IPC { | 20 namespace IPC { |
| 20 class Message; | 21 class Message; |
| 21 } | 22 } |
| (...skipping 27 matching lines...) Expand all Loading... |
| 49 const std::vector<SpellCheckMarker>& markers); | 50 const std::vector<SpellCheckMarker>& markers); |
| 50 void ResetResult(); | 51 void ResetResult(); |
| 51 | 52 |
| 52 void SetLastResults( | 53 void SetLastResults( |
| 53 const base::string16 last_request, | 54 const base::string16 last_request, |
| 54 blink::WebVector<blink::WebTextCheckingResult>& last_results); | 55 blink::WebVector<blink::WebTextCheckingResult>& last_results); |
| 55 bool SatisfyRequestFromCache(const base::string16& text, | 56 bool SatisfyRequestFromCache(const base::string16& text, |
| 56 blink::WebTextCheckingCompletion* completion); | 57 blink::WebTextCheckingCompletion* completion); |
| 57 | 58 |
| 58 base::string16 text_; | 59 base::string16 text_; |
| 59 std::vector<std::unique_ptr<IPC::Message>> messages_; | 60 ScopedVector<IPC::Message> messages_; |
| 60 size_t spelling_service_call_count_; | 61 size_t spelling_service_call_count_; |
| 61 }; | 62 }; |
| 62 | 63 |
| 63 // SpellCheckProvider test fixture. | 64 // SpellCheckProvider test fixture. |
| 64 class SpellCheckProviderTest : public testing::Test { | 65 class SpellCheckProviderTest : public testing::Test { |
| 65 public: | 66 public: |
| 66 SpellCheckProviderTest(); | 67 SpellCheckProviderTest(); |
| 67 ~SpellCheckProviderTest() override; | 68 ~SpellCheckProviderTest() override; |
| 68 | 69 |
| 69 protected: | 70 protected: |
| 70 TestingSpellCheckProvider provider_; | 71 TestingSpellCheckProvider provider_; |
| 71 }; | 72 }; |
| 72 | 73 |
| 73 #endif // COMPONENTS_SPELLCHECK_RENDERER_SPELLCHECK_PROVIDER_TEST_H_ | 74 #endif // COMPONENTS_SPELLCHECK_RENDERER_SPELLCHECK_PROVIDER_TEST_H_ |
| OLD | NEW |