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

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

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 #include "components/spellcheck/renderer/spellcheck_provider_test.h" 5 #include "components/spellcheck/renderer/spellcheck_provider_test.h"
6 6
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "components/spellcheck/common/spellcheck_marker.h" 8 #include "components/spellcheck/common/spellcheck_marker.h"
9 #include "components/spellcheck/common/spellcheck_messages.h" 9 #include "components/spellcheck/common/spellcheck_messages.h"
10 #include "components/spellcheck/renderer/spellcheck.h" 10 #include "components/spellcheck/renderer/spellcheck.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 completion->didFinishCheckingText(results); 89 completion->didFinishCheckingText(results);
90 last_request_ = text; 90 last_request_ = text;
91 last_results_ = results; 91 last_results_ = results;
92 #endif 92 #endif
93 } 93 }
94 94
95 void TestingSpellCheckProvider::ResetResult() { 95 void TestingSpellCheckProvider::ResetResult() {
96 text_.clear(); 96 text_.clear();
97 } 97 }
98 98
99 void TestingSpellCheckProvider::SetLastResults(
100 const base::string16 last_request,
101 blink::WebVector<blink::WebTextCheckingResult>& last_results) {
102 last_request_ = last_request;
103 last_results_ = last_results;
104 }
105
106 bool TestingSpellCheckProvider::SatisfyRequestFromCache(
107 const base::string16& text,
108 blink::WebTextCheckingCompletion* completion) {
109 return SpellCheckProvider::SatisfyRequestFromCache(text, completion);
110 }
111
99 SpellCheckProviderTest::SpellCheckProviderTest() {} 112 SpellCheckProviderTest::SpellCheckProviderTest() {}
100 SpellCheckProviderTest::~SpellCheckProviderTest() {} 113 SpellCheckProviderTest::~SpellCheckProviderTest() {}
101 114
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698