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

Side by Side Diff: components/spellcheck/renderer/spellcheck_worditerator_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 (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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/format_macros.h" 10 #include "base/format_macros.h"
11 #include "base/i18n/break_iterator.h" 11 #include "base/i18n/break_iterator.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/strings/string_split.h" 13 #include "base/strings/string_split.h"
14 #include "base/strings/stringprintf.h" 14 #include "base/strings/stringprintf.h"
15 #include "base/strings/utf_string_conversions.h" 15 #include "base/strings/utf_string_conversions.h"
16 #include "chrome/renderer/spellchecker/spellcheck_worditerator.h" 16 #include "components/spellcheck/renderer/spellcheck_worditerator.h"
17 #include "testing/gtest/include/gtest/gtest.h" 17 #include "testing/gtest/include/gtest/gtest.h"
18 18
19 using base::i18n::BreakIterator; 19 using base::i18n::BreakIterator;
20 using WordIteratorStatus = SpellcheckWordIterator::WordIteratorStatus; 20 using WordIteratorStatus = SpellcheckWordIterator::WordIteratorStatus;
21 21
22 namespace { 22 namespace {
23 23
24 struct TestCase { 24 struct TestCase {
25 const char* language; 25 const char* language;
26 bool allow_contraction; 26 bool allow_contraction;
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 EXPECT_EQ(base::UTF8ToUTF16("."), iter.GetString()); 499 EXPECT_EQ(base::UTF8ToUTF16("."), iter.GetString());
500 EXPECT_EQ(iter.GetWordBreakStatus(), BreakIterator::IS_SKIPPABLE_WORD); 500 EXPECT_EQ(iter.GetWordBreakStatus(), BreakIterator::IS_SKIPPABLE_WORD);
501 EXPECT_TRUE(iter.Advance()); 501 EXPECT_TRUE(iter.Advance());
502 EXPECT_EQ(base::UTF8ToUTF16(" "), iter.GetString()); 502 EXPECT_EQ(base::UTF8ToUTF16(" "), iter.GetString());
503 EXPECT_EQ(iter.GetWordBreakStatus(), BreakIterator::IS_SKIPPABLE_WORD); 503 EXPECT_EQ(iter.GetWordBreakStatus(), BreakIterator::IS_SKIPPABLE_WORD);
504 EXPECT_TRUE(iter.Advance()); 504 EXPECT_TRUE(iter.Advance());
505 EXPECT_EQ(base::UTF8ToUTF16(","), iter.GetString()); 505 EXPECT_EQ(base::UTF8ToUTF16(","), iter.GetString());
506 EXPECT_EQ(iter.GetWordBreakStatus(), BreakIterator::IS_SKIPPABLE_WORD); 506 EXPECT_EQ(iter.GetWordBreakStatus(), BreakIterator::IS_SKIPPABLE_WORD);
507 EXPECT_FALSE(iter.Advance()); 507 EXPECT_FALSE(iter.Advance());
508 } 508 }
OLDNEW
« no previous file with comments | « components/spellcheck/renderer/spellcheck_worditerator.cc ('k') | components/spellcheck/renderer/spelling_engine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698