Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(205)

Side by Side Diff: components/spellcheck/renderer/spellcheck_provider_test.h

Issue 2494123002: Spellcheck : Fix caching in cases where text is deleted. (Closed)
Patch Set: rebase + fix year Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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>
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
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); 50 const std::vector<SpellCheckMarker>& markers);
51 void ResetResult(); 51 void ResetResult();
52 52
53 void SetLastResults(
54 const base::string16 last_request,
55 blink::WebVector<blink::WebTextCheckingResult>& last_results);
56 bool SatisfyRequestFromCache(const base::string16& text,
57 blink::WebTextCheckingCompletion* completion);
58
53 base::string16 text_; 59 base::string16 text_;
54 ScopedVector<IPC::Message> messages_; 60 ScopedVector<IPC::Message> messages_;
55 size_t spelling_service_call_count_; 61 size_t spelling_service_call_count_;
56 }; 62 };
57 63
58 // SpellCheckProvider test fixture. 64 // SpellCheckProvider test fixture.
59 class SpellCheckProviderTest : public testing::Test { 65 class SpellCheckProviderTest : public testing::Test {
60 public: 66 public:
61 SpellCheckProviderTest(); 67 SpellCheckProviderTest();
62 ~SpellCheckProviderTest() override; 68 ~SpellCheckProviderTest() override;
63 69
64 protected: 70 protected:
65 TestingSpellCheckProvider provider_; 71 TestingSpellCheckProvider provider_;
66 }; 72 };
67 73
68 #endif // COMPONENTS_SPELLCHECK_RENDERER_SPELLCHECK_PROVIDER_TEST_H_ 74 #endif // COMPONENTS_SPELLCHECK_RENDERER_SPELLCHECK_PROVIDER_TEST_H_
OLDNEW
« no previous file with comments | « components/spellcheck/renderer/spellcheck_provider.cc ('k') | components/spellcheck/renderer/spellcheck_provider_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698