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

Side by Side Diff: chrome/browser/spellchecker/word_trimmer_unittest.cc

Issue 16387014: Use a direct include of utf_string_conversions.h in chrome/browser/, part 3. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 6 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
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 "chrome/browser/spellchecker/word_trimmer.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 TEST(WordTrimmerTest, TrimWordsEmptyText) { 10 TEST(WordTrimmerTest, TrimWordsEmptyText) {
11 size_t start = 0; 11 size_t start = 0;
12 size_t end = 0; 12 size_t end = 0;
13 EXPECT_EQ(string16(), TrimWords(&start, end, string16(), 0)); 13 EXPECT_EQ(string16(), TrimWords(&start, end, string16(), 0));
14 EXPECT_EQ(0UL, start); 14 EXPECT_EQ(0UL, start);
15 } 15 }
16 16
17 TEST(WordTrimmerTest, TrimWordsStart) { 17 TEST(WordTrimmerTest, TrimWordsStart) {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 EXPECT_EQ(4UL, start); 54 EXPECT_EQ(4UL, start);
55 } 55 }
56 56
57 TEST(WordTrimmerTest, TrimWordsInvalid) { 57 TEST(WordTrimmerTest, TrimWordsInvalid) {
58 size_t start = 23; 58 size_t start = 23;
59 size_t end = 14; 59 size_t end = 14;
60 EXPECT_EQ(ASCIIToUTF16("one two three four five six seven eight"), TrimWords( 60 EXPECT_EQ(ASCIIToUTF16("one two three four five six seven eight"), TrimWords(
61 &start, end, ASCIIToUTF16("one two three four five six seven eight"), 2)); 61 &start, end, ASCIIToUTF16("one two three four five six seven eight"), 2));
62 EXPECT_EQ(23UL, start); 62 EXPECT_EQ(23UL, start);
63 } 63 }
OLDNEW
« no previous file with comments | « chrome/browser/spellchecker/spelling_service_client_unittest.cc ('k') | chrome/browser/ssl/ssl_blocking_page.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698