From e5366896e9ccb3dd17c590d115bd999e987a33af Mon Sep 17 00:00:00 2001 From: "brettw@chromium.org" Date: Wed, 23 Jun 2010 15:35:25 +0000 Subject: Replace wstring with string16 in history. The only time wstring is used now in history is for bookmark-related stuff (the bookmarks system is still wstring-based). The substantial change here is in RTL to make a string16 variant of the functions and in changing the WordIterator to use string16 (this cleaned up some weird utf-32 code). TEST=none BUG=none Review URL: http://codereview.chromium.org/2808017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50597 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/history/text_database_unittest.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'chrome/browser/history/text_database_unittest.cc') diff --git a/chrome/browser/history/text_database_unittest.cc b/chrome/browser/history/text_database_unittest.cc index c94de8a..f604301 100644 --- a/chrome/browser/history/text_database_unittest.cc +++ b/chrome/browser/history/text_database_unittest.cc @@ -223,9 +223,9 @@ TEST_F(TextDatabaseTest, Query) { EXPECT_TRUE(Time::FromInternalValue(kTime2) == results[1].time); EXPECT_TRUE(Time::FromInternalValue(kTime3) == results[0].time); - EXPECT_EQ(UTF8ToWide(std::string(kTitle1)), results[2].title); - EXPECT_EQ(UTF8ToWide(std::string(kTitle2)), results[1].title); - EXPECT_EQ(UTF8ToWide(std::string(kTitle3)), results[0].title); + EXPECT_EQ(std::string(kTitle1), UTF16ToUTF8(results[2].title)); + EXPECT_EQ(std::string(kTitle2), UTF16ToUTF8(results[1].title)); + EXPECT_EQ(std::string(kTitle3), UTF16ToUTF8(results[0].title)); // Should have no matches in the title. EXPECT_EQ(0U, results[0].title_match_positions.size()); @@ -235,11 +235,11 @@ TEST_F(TextDatabaseTest, Query) { // We don't want to be dependent on the exact snippet algorithm, but we know // since we searched for "COUNTTAG" which occurs at the beginning of each // document, that each snippet should start with that. - EXPECT_TRUE(StartsWithASCII(WideToUTF8(results[0].snippet.text()), + EXPECT_TRUE(StartsWithASCII(UTF16ToUTF8(results[0].snippet.text()), "COUNTTAG", false)); - EXPECT_TRUE(StartsWithASCII(WideToUTF8(results[1].snippet.text()), + EXPECT_TRUE(StartsWithASCII(UTF16ToUTF8(results[1].snippet.text()), "COUNTTAG", false)); - EXPECT_TRUE(StartsWithASCII(WideToUTF8(results[2].snippet.text()), + EXPECT_TRUE(StartsWithASCII(UTF16ToUTF8(results[2].snippet.text()), "COUNTTAG", false)); } -- cgit v1.1