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

Side by Side Diff: components/spellcheck/browser/word_trimmer_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
« no previous file with comments | « components/spellcheck/browser/word_trimmer.cc ('k') | components/spellcheck/common/BUILD.gn » ('j') | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/spellchecker/word_trimmer.h" 5 #include "components/spellcheck/browser/word_trimmer.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
11 11
12 using base::ASCIIToUTF16; 12 using base::ASCIIToUTF16;
13 13
14 TEST(WordTrimmerTest, TrimWordsEmptyText) { 14 TEST(WordTrimmerTest, TrimWordsEmptyText) {
15 size_t start = 0; 15 size_t start = 0;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 EXPECT_EQ(4UL, start); 58 EXPECT_EQ(4UL, start);
59 } 59 }
60 60
61 TEST(WordTrimmerTest, TrimWordsInvalid) { 61 TEST(WordTrimmerTest, TrimWordsInvalid) {
62 size_t start = 23; 62 size_t start = 23;
63 size_t end = 14; 63 size_t end = 14;
64 EXPECT_EQ(ASCIIToUTF16("one two three four five six seven eight"), TrimWords( 64 EXPECT_EQ(ASCIIToUTF16("one two three four five six seven eight"), TrimWords(
65 &start, end, ASCIIToUTF16("one two three four five six seven eight"), 2)); 65 &start, end, ASCIIToUTF16("one two three four five six seven eight"), 2));
66 EXPECT_EQ(23UL, start); 66 EXPECT_EQ(23UL, start);
67 } 67 }
OLDNEW
« no previous file with comments | « components/spellcheck/browser/word_trimmer.cc ('k') | components/spellcheck/common/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698