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

Unified Diff: components/test_runner/spell_check_client.cc

Issue 2648433008: Use explicit WebString conversions in LayoutTest related files (Closed)
Patch Set: . Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/test_runner/mock_spell_check.cc ('k') | components/test_runner/web_view_test_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/test_runner/spell_check_client.cc
diff --git a/components/test_runner/spell_check_client.cc b/components/test_runner/spell_check_client.cc
index c2e562ff85684f0506acbc7ca0d9ed18a71456be..50cd5f932e9fe0e96a94f4201a3d4f7f92fcfa22 100644
--- a/components/test_runner/spell_check_client.cc
+++ b/components/test_runner/spell_check_client.cc
@@ -100,18 +100,20 @@ void SpellCheckClient::FinishLastTextCheck() {
return;
std::vector<blink::WebTextCheckingResult> results;
int offset = 0;
- base::string16 text = last_requested_text_check_string_;
- if (!spell_check_.IsMultiWordMisspelling(blink::WebString(text), &results)) {
+ if (!spell_check_.IsMultiWordMisspelling(last_requested_text_check_string_,
+ &results)) {
+ base::string16 text = last_requested_text_check_string_.utf16();
while (text.length()) {
int misspelled_position = 0;
int misspelled_length = 0;
- spell_check_.SpellCheckWord(
- blink::WebString(text), &misspelled_position, &misspelled_length);
+ spell_check_.SpellCheckWord(blink::WebString::fromUTF16(text),
+ &misspelled_position, &misspelled_length);
if (!misspelled_length)
break;
blink::WebVector<blink::WebString> suggestions;
spell_check_.FillSuggestionList(
- blink::WebString(text.substr(misspelled_position, misspelled_length)),
+ blink::WebString::fromUTF16(
+ text.substr(misspelled_position, misspelled_length)),
&suggestions);
results.push_back(blink::WebTextCheckingResult(
blink::WebTextDecorationTypeSpelling,
« no previous file with comments | « components/test_runner/mock_spell_check.cc ('k') | components/test_runner/web_view_test_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698