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

Side by Side Diff: chrome/renderer/spellchecker/spellcheck_provider_hunspell_unittest.cc

Issue 10876010: Treat non-English words as words. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 4 months 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 | Annotate | Revision Log
« no previous file with comments | « chrome/renderer/spellchecker/spellcheck_provider.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <vector> 5 #include <vector>
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "chrome/common/spellcheck_messages.h" 9 #include "chrome/common/spellcheck_messages.h"
10 #include "chrome/renderer/spellchecker/spellcheck_provider.h" 10 #include "chrome/renderer/spellchecker/spellcheck_provider.h"
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 EXPECT_EQ(completion.completion_count_, 2U); 196 EXPECT_EQ(completion.completion_count_, 2U);
197 EXPECT_EQ(completion.cancellation_count_, 1U); 197 EXPECT_EQ(completion.cancellation_count_, 1U);
198 198
199 // Test that the SpellCheckProvider class cancels an incoming request that 199 // Test that the SpellCheckProvider class cancels an incoming request that
200 // does not include any words. 200 // does not include any words.
201 provider_.RequestTextChecking(WebKit::WebString(":-)"), 201 provider_.RequestTextChecking(WebKit::WebString(":-)"),
202 document_tag, 202 document_tag,
203 &completion); 203 &completion);
204 EXPECT_EQ(completion.completion_count_, 3U); 204 EXPECT_EQ(completion.completion_count_, 3U);
205 EXPECT_EQ(completion.cancellation_count_, 2U); 205 EXPECT_EQ(completion.cancellation_count_, 2U);
206
207 // Test that the SpellCheckProvider class sends a request when it receives a
208 // Russian word.
209 const wchar_t kRussianWord[] = L"\x0431\x0451\x0434\x0440\x0430";
210 provider_.RequestTextChecking(WebKit::WebString(WideToUTF16(kRussianWord)),
211 document_tag,
212 &completion);
213 EXPECT_EQ(completion.completion_count_, 4U);
214 EXPECT_EQ(completion.cancellation_count_, 2U);
206 } 215 }
207 216
208 } // namespace 217 } // namespace
OLDNEW
« no previous file with comments | « chrome/renderer/spellchecker/spellcheck_provider.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698