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