summaryrefslogtreecommitdiffstats
path: root/chrome/browser/bookmarks/bookmark_html_writer_unittest.cc
diff options
context:
space:
mode:
authorviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-31 16:52:13 +0000
committerviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-31 16:52:13 +0000
commit80f6e421502c5b24d306550480b9b0f29e1b26f6 (patch)
treef01490657ee20b394065c6830c51f6c3338c26e1 /chrome/browser/bookmarks/bookmark_html_writer_unittest.cc
parentf9b2dbd7970feab15a278d5d7f099f48dc0775cc (diff)
downloadchromium_src-80f6e421502c5b24d306550480b9b0f29e1b26f6.zip
chromium_src-80f6e421502c5b24d306550480b9b0f29e1b26f6.tar.gz
chromium_src-80f6e421502c5b24d306550480b9b0f29e1b26f6.tar.bz2
Convert wstrings in bookmarks, part 1000000.
BUG=23581 TEST=builds and passes tests Review URL: http://codereview.chromium.org/3249013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58006 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/bookmarks/bookmark_html_writer_unittest.cc')
-rw-r--r--chrome/browser/bookmarks/bookmark_html_writer_unittest.cc41
1 files changed, 21 insertions, 20 deletions
diff --git a/chrome/browser/bookmarks/bookmark_html_writer_unittest.cc b/chrome/browser/bookmarks/bookmark_html_writer_unittest.cc
index 90ad16b..4a365e8 100644
--- a/chrome/browser/bookmarks/bookmark_html_writer_unittest.cc
+++ b/chrome/browser/bookmarks/bookmark_html_writer_unittest.cc
@@ -53,40 +53,41 @@ class BookmarkHTMLWriterTest : public testing::Test {
}
// Converts a BookmarkEntry to a string suitable for assertion testing.
- std::wstring BookmarkEntryToString(
+ string16 BookmarkEntryToString(
const ProfileWriter::BookmarkEntry& entry) {
- std::wstring result;
- result.append(L"on_toolbar=");
+ string16 result;
+ result.append(ASCIIToUTF16("on_toolbar="));
if (entry.in_toolbar)
- result.append(L"false");
+ result.append(ASCIIToUTF16("false"));
else
- result.append(L"true");
+ result.append(ASCIIToUTF16("true"));
- result.append(L" url=" + UTF8ToWide(entry.url.spec()));
+ result.append(ASCIIToUTF16(" url=") + UTF8ToUTF16(entry.url.spec()));
- result.append(L" path=");
+ result.append(ASCIIToUTF16(" path="));
for (size_t i = 0; i < entry.path.size(); ++i) {
if (i != 0)
- result.append(L"/");
- result.append(entry.path[i]);
+ result.append(ASCIIToUTF16("/"));
+ result.append(WideToUTF16Hack(entry.path[i]));
}
- result.append(L" title=");
- result.append(entry.title);
+ result.append(ASCIIToUTF16(" title="));
+ result.append(WideToUTF16Hack(entry.title));
- result.append(L" time=");
- result.append(base::TimeFormatFriendlyDateAndTime(entry.creation_time));
+ result.append(ASCIIToUTF16(" time="));
+ result.append(WideToUTF16Hack(
+ base::TimeFormatFriendlyDateAndTime(entry.creation_time)));
return result;
}
// Creates a set of bookmark values to a string for assertion testing.
- std::wstring BookmarkValuesToString(bool on_toolbar,
- const GURL& url,
- const string16& title,
- base::Time creation_time,
- const string16& f1,
- const string16& f2,
- const string16& f3) {
+ string16 BookmarkValuesToString(bool on_toolbar,
+ const GURL& url,
+ const string16& title,
+ base::Time creation_time,
+ const string16& f1,
+ const string16& f2,
+ const string16& f3) {
ProfileWriter::BookmarkEntry entry;
entry.in_toolbar = on_toolbar;
entry.url = url;