diff options
author | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-18 06:34:13 +0000 |
---|---|---|
committer | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-18 06:34:13 +0000 |
commit | 6524385ef3fb2f1f26675d66cee2dad649883be6 (patch) | |
tree | c0f807e54894299399da67834a1980534daa1a2d /chrome/browser/bookmarks/bookmark_html_writer_unittest.cc | |
parent | f51ef0d27f701feb2c47096c9a73039e0c389a60 (diff) | |
download | chromium_src-6524385ef3fb2f1f26675d66cee2dad649883be6.zip chromium_src-6524385ef3fb2f1f26675d66cee2dad649883be6.tar.gz chromium_src-6524385ef3fb2f1f26675d66cee2dad649883be6.tar.bz2 |
Remove wstrings from bookmarks, part 1 (of many).
Start by removing wstring versions of BookmarkModel::AddURLWithCreationTime()
and BookmarkModel::SetURLStarred().
BUG=23581
TEST=builds and passes tests
Review URL: http://codereview.chromium.org/3111012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56488 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.cc | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/chrome/browser/bookmarks/bookmark_html_writer_unittest.cc b/chrome/browser/bookmarks/bookmark_html_writer_unittest.cc index 042f3aa..8172437 100644 --- a/chrome/browser/bookmarks/bookmark_html_writer_unittest.cc +++ b/chrome/browser/bookmarks/bookmark_html_writer_unittest.cc @@ -8,8 +8,10 @@ #include "base/file_util.h" #include "base/message_loop.h" #include "base/path_service.h" +#include "base/string16.h" #include "base/string_util.h" #include "base/time.h" +#include "base/utf_string_conversions.h" #include "base/i18n/time_formatting.h" #include "chrome/browser/bookmarks/bookmark_html_writer.h" #include "chrome/browser/bookmarks/bookmark_model.h" @@ -80,7 +82,7 @@ class BookmarkHTMLWriterTest : public testing::Test { // Creates a set of bookmark values to a string for assertion testing. std::wstring BookmarkValuesToString(bool on_toolbar, const GURL& url, - const std::wstring& title, + const string16& title, base::Time creation_time, const std::wstring& f1, const std::wstring& f2, @@ -99,7 +101,7 @@ class BookmarkHTMLWriterTest : public testing::Test { entry.path.push_back(f3); } } - entry.title = title; + entry.title = UTF16ToWideHack(title); entry.creation_time = creation_time; return BookmarkEntryToString(entry); } @@ -107,7 +109,7 @@ class BookmarkHTMLWriterTest : public testing::Test { void AssertBookmarkEntryEquals(const ProfileWriter::BookmarkEntry& entry, bool on_toolbar, const GURL& url, - const std::wstring& title, + const string16& title, base::Time creation_time, const std::wstring& f1, const std::wstring& f2, @@ -175,10 +177,10 @@ TEST_F(BookmarkHTMLWriterTest, Test) { std::wstring f2_title = L"F2"; std::wstring f3_title = L"F 3"; std::wstring f4_title = L"F4"; - std::wstring url1_title = L"url 1"; - std::wstring url2_title = L"url&2"; - std::wstring url3_title = L"url\"3"; - std::wstring url4_title = L"url\"&;"; + string16 url1_title = ASCIIToUTF16("url 1"); + string16 url2_title = ASCIIToUTF16("url&2"); + string16 url3_title = ASCIIToUTF16("url\"3"); + string16 url4_title = ASCIIToUTF16("url\"&;"); GURL url1("http://url1"); GURL url1_favicon("http://url1/icon.ico"); GURL url2("http://url2"); |