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

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

Issue 2159283003: [WIP][DO NOT LAND] Componentize spellcheck Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <memory> 8 #include <memory>
9 #include <utility> 9 #include <utility>
10 10
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/path_service.h" 12 #include "base/path_service.h"
13 #include "base/strings/string_split.h" 13 #include "base/strings/string_split.h"
14 #include "base/strings/string_util.h" 14 #include "base/strings/string_util.h"
15 #include "base/strings/utf_string_conversions.h" 15 #include "base/strings/utf_string_conversions.h"
16 #include "chrome/common/spellcheck_common.h" 16 #include "components/spellcheck/common/spellcheck_common.h"
17 #include "chrome/common/spellcheck_result.h" 17 #include "components/spellcheck/common/spellcheck_result.h"
18 #include "chrome/renderer/spellchecker/spellcheck.h" 18 #include "components/spellcheck/renderer/spellcheck.h"
19 #include "chrome/renderer/spellchecker/spellcheck_provider_test.h" 19 #include "components/spellcheck/renderer/spellcheck_provider_test.h"
20 #include "testing/gtest/include/gtest/gtest.h" 20 #include "testing/gtest/include/gtest/gtest.h"
21 #include "third_party/WebKit/public/platform/WebString.h" 21 #include "third_party/WebKit/public/platform/WebString.h"
22 #include "third_party/WebKit/public/platform/WebVector.h" 22 #include "third_party/WebKit/public/platform/WebVector.h"
23 #include "third_party/WebKit/public/web/WebTextCheckingResult.h" 23 #include "third_party/WebKit/public/web/WebTextCheckingResult.h"
24 24
25 namespace { 25 namespace {
26 26
27 struct SpellcheckTestCase { 27 struct SpellcheckTestCase {
28 // A string of text for checking. 28 // A string of text for checking.
29 const wchar_t* input; 29 const wchar_t* input;
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 base::WideToUTF16(kTestCases[i].expected_suggestions), 247 base::WideToUTF16(kTestCases[i].expected_suggestions),
248 base::string16(1, ','), base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); 248 base::string16(1, ','), base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
249 249
250 EXPECT_EQ(expected_suggestions.size(), suggestions.size()); 250 EXPECT_EQ(expected_suggestions.size(), suggestions.size());
251 for (size_t j = 0; 251 for (size_t j = 0;
252 j < std::min(expected_suggestions.size(), suggestions.size()); j++) { 252 j < std::min(expected_suggestions.size(), suggestions.size()); j++) {
253 EXPECT_EQ(expected_suggestions[j], base::string16(suggestions[j])); 253 EXPECT_EQ(expected_suggestions[j], base::string16(suggestions[j]));
254 } 254 }
255 } 255 }
256 } 256 }
OLDNEW
« no previous file with comments | « components/spellcheck/renderer/spellcheck_language.cc ('k') | components/spellcheck/renderer/spellcheck_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698